[FFmpeg-cvslog] avformat/avidec: Workaround broken initial frame

Michael Niedermayer git at videolan.org
Fri Oct 9 22:14:55 CEST 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Tue Sep 15 04:01:27 2015 +0200| [6b4a22b5e9b37d8631d1e5af13ec687fa842622a] | committer: Carl Eugen Hoyos

avformat/avidec: Workaround broken initial frame

Fixes Ticket4851

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 3e2ef00394b8079e93835d47c993868229f07502)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6b4a22b5e9b37d8631d1e5af13ec687fa842622a
---

 libavformat/avidec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index eec748f..7387217 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1544,7 +1544,8 @@ static int avi_read_idx1(AVFormatContext *s, int size)
         ast = st->priv_data;
 
         if (first_packet && first_packet_pos) {
-            data_offset  = first_packet_pos - pos;
+            if (avi->movi_list + 4 != pos || pos + 500 > first_packet_pos)
+                data_offset  = first_packet_pos - pos;
             first_packet = 0;
         }
         pos += data_offset;



More information about the ffmpeg-cvslog mailing list