mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/bmp_parser: delay frame end detection to the next header or EOF
Fixes Ticket3687 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3c6d824b80
commit
ceb2fe027f
|
@ -62,11 +62,13 @@ restart:
|
||||||
bpc->pc.frame_start_found = 0;
|
bpc->pc.frame_start_found = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (bpc->fsize <= ihsize + 14)
|
|
||||||
bpc->fsize = INT_MAX/2;
|
|
||||||
bpc->pc.frame_start_found++;
|
bpc->pc.frame_start_found++;
|
||||||
bpc->remaining_size = bpc->fsize + i - 17;
|
bpc->remaining_size = bpc->fsize + i - 17;
|
||||||
goto restart;
|
|
||||||
|
if (bpc->pc.index + i > 17) {
|
||||||
|
next = i - 17;
|
||||||
|
} else
|
||||||
|
goto restart;
|
||||||
} else if (bpc->pc.frame_start_found)
|
} else if (bpc->pc.frame_start_found)
|
||||||
bpc->pc.frame_start_found++;
|
bpc->pc.frame_start_found++;
|
||||||
}
|
}
|
||||||
|
@ -77,7 +79,9 @@ restart:
|
||||||
bpc->remaining_size -= i;
|
bpc->remaining_size -= i;
|
||||||
if (bpc->remaining_size)
|
if (bpc->remaining_size)
|
||||||
goto flush;
|
goto flush;
|
||||||
next = i;
|
|
||||||
|
bpc->pc.frame_start_found = 0;
|
||||||
|
goto restart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue