mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +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;
|
||||
|
||||
bytestream2_init(&gbc, avpkt->data, avpkt->size);
|
||||
if ( avpkt->size >= 552
|
||||
&& AV_RB32(&avpkt->data[ 10]) != 0x001102FF
|
||||
&& AV_RB32(&avpkt->data[522]) == 0x001102FF)
|
||||
bytestream2_skip(&gbc, 512);
|
||||
|
||||
/* PICT images start with a 512 bytes empty header */
|
||||
if (bytestream2_peek_be32(&gbc) == 0)
|
||||
while ( bytestream2_get_bytes_left(&gbc) >= 552
|
||||
&& ( !AV_RB16(&avpkt->data[bytestream2_tell(&gbc)+6])
|
||||
|| !AV_RB16(&avpkt->data[bytestream2_tell(&gbc)+8])))
|
||||
bytestream2_skip(&gbc, 512);
|
||||
|
||||
/* smallest PICT header */
|
||||
|
Loading…
Reference in New Issue
Block a user