[FFmpeg-devel] [RFC] Change fallthrough logic for read_seekto?be based on return value

Michael Niedermayer michaelni at gmx.at
Tue Sep 13 15:56:12 CEST 2011


On Tue, Sep 13, 2011 at 07:35:09AM +0000, Joakim Plate wrote:
> Michael Niedermayer <michaelni <at> gmx.at> writes:
> 
> > 
> > please explain why
> >  AVFMT_NOBINSEARCH and AVFMT_NOGENSEARCH
> > are not sufficient or why they are not ideal
> > 
> > [...]
> > 
> 
> 
> It just feels like those are more for demuxer that don't implement
> read_seek at all. Also it looks like a majority of demuxer are
> really done after they fail inside their own read_seek
> function, no good will come out of trying the generic versions.
>
> Also if another seek function is eventually added you have to
> add another flag and go through all demuxer again to update
> them to not use that.

<RFC>
I think if fallbacks are indicated from read_seek() it would be more
readable to do it like
if(index object not found)
    return av_seek_frame_binary()

or
if(index object not found)
    return av_seek_fallback()

than

if(index object not found)
    return ENOSYS

For the transition this would need a AVFMT_NOSEARCHFALLBACK so one
demuxer at a time can be converted.
that flag would also avoid the problem of merging demuxers in and
forgetting that they might still expect the fallbaclk behavior
</RFC>



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110913/c61b9f49/attachment.asc>


More information about the ffmpeg-devel mailing list