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

Originally committed as revision 18958 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Baptiste Coudurier 16 years ago
parent 401a995085
commit 6645e8ca2f
  1. 3
      libavcodec/parser.c

@ -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;

Loading…
Cancel
Save