avformat/avidec: Workaround broken initial frame

Fixes Ticket4851

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

Conflicts:
	libavformat/avidec.c
This commit is contained in:
Michael Niedermayer 2015-09-15 04:01:27 +02:00 committed by Carl Eugen Hoyos
parent 928473a187
commit 0cdeacf41b
1 changed files with 2 additions and 1 deletions

View File

@ -1309,6 +1309,7 @@ static int avi_read_idx1(AVFormatContext *s, int size)
ast = st->priv_data; ast = st->priv_data;
if (first_packet && first_packet_pos) { if (first_packet && first_packet_pos) {
if (avi->movi_list + 4 != pos || pos + 500 > first_packet_pos)
data_offset = first_packet_pos - pos; data_offset = first_packet_pos - pos;
first_packet = 0; first_packet = 0;
} }