mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/qdrw: cleanup skip code
Skip 512 byte sectors until a non zero resolution is found Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b6e8166a48
commit
4b28907e4a
@ -124,13 +124,9 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
int w, h, ret;
|
int w, h, ret;
|
||||||
|
|
||||||
bytestream2_init(&gbc, avpkt->data, avpkt->size);
|
bytestream2_init(&gbc, avpkt->data, avpkt->size);
|
||||||
if ( avpkt->size >= 552
|
while ( bytestream2_get_bytes_left(&gbc) >= 552
|
||||||
&& AV_RB32(&avpkt->data[ 10]) != 0x001102FF
|
&& ( !AV_RB16(&avpkt->data[bytestream2_tell(&gbc)+6])
|
||||||
&& AV_RB32(&avpkt->data[522]) == 0x001102FF)
|
|| !AV_RB16(&avpkt->data[bytestream2_tell(&gbc)+8])))
|
||||||
bytestream2_skip(&gbc, 512);
|
|
||||||
|
|
||||||
/* PICT images start with a 512 bytes empty header */
|
|
||||||
if (bytestream2_peek_be32(&gbc) == 0)
|
|
||||||
bytestream2_skip(&gbc, 512);
|
bytestream2_skip(&gbc, 512);
|
||||||
|
|
||||||
/* smallest PICT header */
|
/* smallest PICT header */
|
||||||
|
Loading…
Reference in New Issue
Block a user