# HG changeset patch # User michael # Date 1106358491 0 # Node ID c129846f7f02863ef003938b2ee96e266f468584 # Parent 25825079f8332d4101dedc98f208cf86604af9bb support discarding of uninterresting packets diff -r 25825079f833 -r c129846f7f02 avformat.h --- a/avformat.h Fri Jan 21 23:38:09 2005 +0000 +++ b/avformat.h Sat Jan 22 01:48:11 2005 +0000 @@ -227,6 +227,8 @@ int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */ /* ffmpeg.c private use */ int stream_copy; /* if TRUE, just copy stream */ + int discard; ///< if 1, packets can be discarded at will and dont need to be demuxed + //FIXME move stuff to a flags field? /* quality, as it has been removed from AVCodecContext and put in AVVideoFrame * MN:dunno if thats the right place, for it */ float quality; diff -r 25825079f833 -r c129846f7f02 avidec.c --- a/avidec.c Fri Jan 21 23:38:09 2005 +0000 +++ b/avidec.c Sat Jan 22 01:48:11 2005 +0000 @@ -449,6 +449,11 @@ AVIStream *ast; st = s->streams[n]; ast = st->priv_data; + + if(st->discard){ + url_fskip(pb, size); + goto resync; + } if( ((ast->prefix_count<5 || sync+9 > i) && d[2]<128 && d[3]<128) || d[2]*256+d[3] == ast->prefix /*||