diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-15 04:01:27 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-10-09 21:47:07 +0200 |
commit | 108a971cd2709a1d1545ed55b7c613de833645fa (patch) | |
tree | 44cd7e161dad1730d5a0e07024899ad60a2c0f8b | |
parent | 3cc3d239f2ba143eba5ecc938f2f0a95f17562f1 (diff) | |
download | ffmpeg-108a971cd2709a1d1545ed55b7c613de833645fa.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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 08cc956376..81d172c072 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1572,7 +1572,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; |