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

Reimar Döffinger Reimar.Doeffinger
Wed Aug 19 08:36:45 CEST 2009


Hello,
$subject otherwise we do not get valid timestamps when switching
streams.
If this behaviour should still be available I propose a
AVDISCARD_ALL_FOREVER or something, that different to the other
AVDISCARD values can not reliably be removed at runtime.
Sample file in incoming/bugz1534
Does this design seem right to you?
Patch:
Index: libavformat/avidec.c
===================================================================
--- libavformat/avidec.c        (revision 19667)
+++ libavformat/avidec.c        (working copy)
@@ -854,7 +854,7 @@
 
             if(   (st->discard >= AVDISCARD_DEFAULT && size==0)
                /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & * PKT_FLAG_KEY))*/ //FIXME needs a little reordering
-               || st->discard >= AVDISCARD_ALL){
+               || st->discard > AVDISCARD_ALL){
                 if(ast->sample_size) ast->frame_offset += pkt->size;
                 else                 ast->frame_offset++;
                 url_fskip(pb, size);




More information about the ffmpeg-devel mailing list