[FFmpeg-devel] [PATCH] Seeking to beginning of avi file skips first audio packet
Michael Niedermayer
michaelni
Mon May 17 19:56:36 CEST 2010
On Sun, May 16, 2010 at 04:31:07PM -0700, John Stebbins wrote:
> When seeking to the beginning of an avi file with av_seek_frame,
> avi_read_seek seeks to the correct position for stream index 0, then
> seeks to the next interleaved packet for all other streams.
no, it does not, there is just 1 seek. The code just initializes
internal variables for the other streams.
> When
> seeking to the beginning of the file, this causes packets for other
> streams to be skipped if these streams start earlier in the file than
> stream 0.
yes thats how the code works, i can see that this may be undesireable
but instead of hacking around on the old seeking api. I think we should
look into getting the new api (avformat_seek_file) in shape and implemented.
otoh if one really wanted to work on the old, a prerequesite of your
change would be to update the old api to describe this issue and
preferred behavior otherwise one can be sure that no 2 demuxers would
behave equal.
>
> This patch changes the logic only when a backward seek is requested. It
yes and maybe this makes sense or maybe not
so why just for backward seeks?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100517/28c8eb8b/attachment.pgp>
More information about the ffmpeg-devel
mailing list