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 00:55:53 +0200
commitf3dfb14f6c408537ed60934dcd9bec065a582d13 (patch)
tree9c9c8d9eea43f710296f2c8182650ea1e4a39221
parentb0d9042f9dbebde7311ca6ee729753ecb60e6f60 (diff)
downloadffmpeg-f3dfb14f6c408537ed60934dcd9bec065a582d13.tar.gz
avformat/avidec: Workaround broken initial frame
Fixes Ticket4851 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 3e2ef00394b8079e93835d47c993868229f07502)
-rw-r--r--libavformat/avidec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 86bea76624..2ad9a94ba8 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1467,7 +1467,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;