|
|
@ -198,12 +198,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, |
|
|
|
bytestream2_skip(gb, 8); |
|
|
|
bytestream2_skip(gb, 8); |
|
|
|
uncompressed = bytestream2_get_le32(gb); |
|
|
|
uncompressed = bytestream2_get_le32(gb); |
|
|
|
|
|
|
|
|
|
|
|
if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0) |
|
|
|
if (!uncompressed) { |
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (uncompressed) { |
|
|
|
|
|
|
|
ret = decode_mvdv(s, avctx, frame); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
av_fast_padded_malloc(&s->uncompressed, &s->uncompressed_size, 16LL * (avpkt->size - 12)); |
|
|
|
av_fast_padded_malloc(&s->uncompressed, &s->uncompressed_size, 16LL * (avpkt->size - 12)); |
|
|
|
if (!s->uncompressed) |
|
|
|
if (!s->uncompressed) |
|
|
|
return AVERROR(ENOMEM); |
|
|
|
return AVERROR(ENOMEM); |
|
|
@ -212,9 +207,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, |
|
|
|
if (ret < 0) |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
bytestream2_init(gb, s->uncompressed, ret); |
|
|
|
bytestream2_init(gb, s->uncompressed, ret); |
|
|
|
ret = decode_mvdv(s, avctx, frame); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0) |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ret = decode_mvdv(s, avctx, frame); |
|
|
|
|
|
|
|
|
|
|
|
if (ret < 0) |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
key = ret; |
|
|
|
key = ret; |
|
|
|