aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/parser.c
diff options
context:
space:
mode:
authorMichael Chinen <mchinen@gmail.com>2010-09-27 22:17:58 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-09-27 22:17:58 +0000
commit59cb40b92194c272c4d097c702a46f90edb94958 (patch)
treead8f74c29dd0b6008e59f3780bdfb43d522b026d /libavcodec/parser.c
parentc6625ad5410389f6bca582b53b23bcd60030e00c (diff)
downloadffmpeg-59cb40b92194c272c4d097c702a46f90edb94958.tar.gz
Fix index_entries pos:
It was being set wrong for files with data_offset > 0 Patch by Michael Chinen, mchinen gmail Originally committed as revision 25239 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r--libavcodec/parser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 1aa86515d8..d877f5d411 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -150,6 +150,12 @@ int av_parser_parse2(AVCodecParserContext *s,
int index, i;
uint8_t dummy_buf[FF_INPUT_BUFFER_PADDING_SIZE];
+ if(!(s->flags & PARSER_FLAG_FETCHED_OFFSET)) {
+ s->next_frame_offset =
+ s->cur_offset = pos;
+ s->flags |= PARSER_FLAG_FETCHED_OFFSET;
+ }
+
if (buf_size == 0) {
/* padding is always necessary even if EOF, so we add it here */
memset(dummy_buf, 0, sizeof(dummy_buf));