summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/rasc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/rasc.c b/libavcodec/rasc.c
index 6e32c15..21fc43f 100644
--- a/libavcodec/rasc.c
+++ b/libavcodec/rasc.c
@@ -723,12 +723,12 @@ static int decode_frame(AVCodecContext *avctx,
return ret;
}
- if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0)
- return ret;
-
if (!s->frame2->data[0] || !s->frame1->data[0])
return AVERROR_INVALIDDATA;
+ if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0)
+ return ret;
+
copy_plane(avctx, s->frame2, s->frame);
if (avctx->pix_fmt == AV_PIX_FMT_PAL8)
memcpy(s->frame->data[1], s->frame2->data[1], 1024);
OpenPOWER on IntegriCloud