do not reference remainder packets in the parser, fix timestamps fetching

Originally committed as revision 18958 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2009-05-26 23:58:30 +00:00
parent 401a995085
commit 6645e8ca2f

View File

@ -153,7 +153,8 @@ int av_parser_parse2(AVCodecParserContext *s,
/* padding is always necessary even if EOF, so we add it here */
memset(dummy_buf, 0, sizeof(dummy_buf));
buf = dummy_buf;
} else {
} else if (s->cur_offset + buf_size !=
s->cur_frame_end[s->cur_frame_start_index]) { /* skip remainder packets */
/* add a new packet descriptor */
i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1);
s->cur_frame_start_index = i;