support discarding uninterresting packets
Originally committed as revision 3860 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user