more fine grained discarding of packets

Originally committed as revision 4051 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2005-03-17 01:25:01 +00:00
parent cc973ecbe7
commit f3356e9c9e
11 changed files with 46 additions and 17 deletions

View File

@@ -821,7 +821,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
compute_pkt_fields(s, st, NULL, pkt);
s->cur_st = NULL;
return 0;
} else if (s->cur_len > 0 && !st->discard) {
} else if (s->cur_len > 0 && st->discard < AVDISCARD_ALL) {
len = av_parser_parse(st->parser, &st->codec, &pkt->data, &pkt->size,
s->cur_ptr, s->cur_len,
s->cur_pkt.pts, s->cur_pkt.dts);