|
|
@@ -245,7 +245,7 @@ static int decode_frame(AVCodecContext *avctx, |
|
|
AVFrame *p = data; |
|
|
AVFrame *p = data; |
|
|
GetByteContext gb; |
|
|
GetByteContext gb; |
|
|
GetBitContext b; |
|
|
GetBitContext b; |
|
|
int i, j, k; |
|
|
|
|
|
|
|
|
int i, j, k, width, height; |
|
|
|
|
|
|
|
|
bytestream2_init(&gb, avpkt->data, avpkt->size); |
|
|
bytestream2_init(&gb, avpkt->data, avpkt->size); |
|
|
if (bytestream2_get_le32(&gb) != MKTAG('M','A','G','Y')) |
|
|
if (bytestream2_get_le32(&gb) != MKTAG('M','A','G','Y')) |
|
|
@@ -309,7 +309,9 @@ static int decode_frame(AVCodecContext *avctx, |
|
|
s->interlaced = !!(bytestream2_get_byte(&gb) & 2); |
|
|
s->interlaced = !!(bytestream2_get_byte(&gb) & 2); |
|
|
bytestream2_skip(&gb, 3); |
|
|
bytestream2_skip(&gb, 3); |
|
|
|
|
|
|
|
|
if ((ret = ff_set_dimensions(avctx, bytestream2_get_le32(&gb), bytestream2_get_le32(&gb))) < 0) |
|
|
|
|
|
|
|
|
width = bytestream2_get_le32(&gb); |
|
|
|
|
|
height = bytestream2_get_le32(&gb); |
|
|
|
|
|
if ((ret = ff_set_dimensions(avctx, width, height)) < 0) |
|
|
return ret; |
|
|
return ret; |
|
|
|
|
|
|
|
|
slice_width = bytestream2_get_le32(&gb); |
|
|
slice_width = bytestream2_get_le32(&gb); |
|
|
|