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:15:15 +0200 |
commit | 7ec05ae96912939bb5a0848b3192e3f30ceeb08e (patch) | |
tree | 6483fd0eedfbaef622d24acccdeffdeb6f89e8a6 | |
parent | b9841ba98c00d6398a4ff74a0c24d5d398c4ae25 (diff) | |
download | ffmpeg-7ec05ae96912939bb5a0848b3192e3f30ceeb08e.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 3881251a78..5a88e05282 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1581,7 +1581,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; |