[FFmpeg-devel] [RFC] Questions and suggestions regarding AVSEEK_FORCE?

Tomas Härdin tomas.hardin
Wed Mar 24 10:05:50 CET 2010


Hi

While poking around with the mov muxer and demuxer the other day I
noticed a peculiar behavior: ffplay wouldn't play files with
sufficiently large skip tags inserted before the mdat tag if the file is
read from a pipe or HTTP stream.

After some digging I figured out that the recently added AVSEEK_FORCE
seems to be meant to deal with the situation. I also submitted a patch
yesterday that fixed a bug in url_fseek() related to that flag. What I'm
a bit curious about is the reason it's needed at all. I've been digging
through the archives a bit but so far haven't found a thread related to
the matter.

My guess is that it'll be used in the new seek system that is mentioned
every now and then. That seems fair, but there's a problem: a whole
bunch of demuxers probably needs that flag as well. As hinted above
these include the mov demuxer and therefore also the avi demuxer, and
the dv demuxer (dv_read_seek() will fail) off the top of my head.

A simpler solution would be to simply have url_fseek() always discard
data when seeking forward (skipping) in nonseekable media, since it's
not possible to seek anyway (best effort). I tried that, and it made it
possible to play and seek forwards in mov and dv files from nonseekable
HTTP and opening the peculiar mov files mentioned in the first
paragraph.

I suspect it may be useful for when there's a need to rewind nonseekable
media, as hinted by the comment in the flag's definition. That feature
is not implemented at the moment though.

/Tomas




More information about the ffmpeg-devel mailing list