[FFmpeg-devel] [PATCH] avidec: index also AVDISCARD_ALL streams

Michael Niedermayer michaelni
Fri Aug 21 11:18:06 CEST 2009

On Wed, Aug 19, 2009 at 01:52:56PM +0200, Reimar D?ffinger wrote:
> On Wed, Aug 19, 2009 at 12:16:49PM +0200, Michael Niedermayer wrote:
> > On Wed, Aug 19, 2009 at 08:36:45AM +0200, Reimar D?ffinger wrote:
> > > Sample file in incoming/bugz1534
> > > Does this design seem right to you?
> > 
> > i have one big question before i can really say anything about the
> > patch,
> > why are the timestamps wrong if this code is run?
> Ups, the timestamp issue was with the MPlayer demuxer. Bad messup.
> There is the issue that I think this file is badly interleaved and thus stream
> switching discards a lot of data, leading to strong desync.
> That can't really be helped, or at least that is MPlayer's problem.
> The issue I can see though (I lack a test case so far) is that for
> a non-interleaved file AV_DISCARD_ALL might drop all packets at once,
> since in avi_read_packet it will do "goto resync" until a packet from a
> not-discarded stream is encountered.
> Over http this also seems like quite a waste of bandwidth.

> Should the "resync:" label maybe be further up, before the
> non-interleaved handling? (I know, hard to say without a sample,

no, i think its more robust as is, but the NI handling code should
not attempt to seek to/ demux packets that belong to disabled streams in the
first place

> but give an opinion and I might try to find a sample if you're not
> sure).
> There is also another issue: loading that file takes ages, because
> it is truncated and thus in avi_load_index the url_fseek and url_fskip
> fail all the time (because the target is beyond the end of file, but
> this does not set eof_reached).
> Now for url_fseek this can easily be fixed, but url_fskip does not
> return an error, so how is this supposed to be done?

> Should url_fskip set eof_reached when url_fseek fails? Or should it have
> a return value? Or...?

i think giving url_fskip() a return value is a good idea


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- 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/20090821/816d22a1/attachment.pgp>

More information about the ffmpeg-devel mailing list