aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-15 04:01:27 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-10-10 01:14:12 +0200
commit055c302a11cdf78d2e31ddfc7ef3be6f46eaa6a0 (patch)
treec279f8d95b8e8831320058cb7a3f0344c59f96c2
parentb44025a1d031fc000dcd984364775fd8014717ba (diff)
downloadffmpeg-055c302a11cdf78d2e31ddfc7ef3be6f46eaa6a0.tar.gz
avformat/avidec: Workaround broken initial frame
Fixes Ticket4851 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 3e2ef00394b8079e93835d47c993868229f07502) Conflicts: libavformat/avidec.c
-rw-r--r--libavformat/avidec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 1d5e3bafb3..9a4f881df7 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1330,7 +1330,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;