aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/parser.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-05-26 23:58:30 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-05-26 23:58:30 +0000
commit6645e8ca2f7156581e66d9f62d24a10b66af68a2 (patch)
treee2f5228f44192b852d071a71bb90a64727a04935 /libavcodec/parser.c
parent401a99508516b62eb4135360bf3d969ccb3c323d (diff)
downloadffmpeg-6645e8ca2f7156581e66d9f62d24a10b66af68a2.tar.gz
do not reference remainder packets in the parser, fix timestamps fetching
Originally committed as revision 18958 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r--libavcodec/parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index bbb2aab461..69215a47d0 100644
--- a/libavcodec/parser.c
+++ b/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;