diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-22 13:36:02 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-22 13:36:02 +0000 |
commit | b9866ebcc7d9891fb6b07cab70319fe1742a100a (patch) | |
tree | 3e74ec233cd2ef881ee097956e7a8ca3e6b215cf /libavformat/rm.c | |
parent | e19456e3ee263ae1c46b623c8394394710721ff4 (diff) | |
download | ffmpeg-b9866ebcc7d9891fb6b07cab70319fe1742a100a.tar.gz |
support discarding uninterresting packets
Originally committed as revision 3860 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rm.c')
-rw-r--r-- | libavformat/rm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/rm.c b/libavformat/rm.c index f0529d0438..e6779a69a0 100644 --- a/libavformat/rm.c +++ b/libavformat/rm.c @@ -811,7 +811,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt) st = s->streams[0]; } else { int seq=1; - +resync: len=sync(s, ×tamp, &flags, &i, &pos); if(len<0) return AVERROR_IO; @@ -841,6 +841,11 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt) len=len2; rm->remaining_len-= len; } + + if(st->discard){ + url_fskip(pb, len); + goto resync; + } av_new_packet(pkt, len); pkt->stream_index = i; |