diff parser.c @ 12529:9a3f2beae2a9 libavcodec

Fix index_entries pos: It was being set wrong for files with data_offset > 0 Patch by Michael Chinen, mchinen gmail
author cehoyos
date Mon, 27 Sep 2010 22:17:58 +0000
parents c70e2fd8f35d
children
line wrap: on
line diff
--- a/parser.c	Mon Sep 27 21:31:29 2010 +0000
+++ b/parser.c	Mon Sep 27 22:17:58 2010 +0000
@@ -150,6 +150,12 @@
     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));