summaryrefslogtreecommitdiff
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 18b1fe9756..a396a6d739 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -411,12 +411,14 @@ static int decode_p_frame(FourXContext *f, AVFrame *frame,
int x, y;
const int width = f->avctx->width;
const int height = f->avctx->height;
- uint16_t *src = (uint16_t *)f->last_picture->data[0];
uint16_t *dst = (uint16_t *)frame->data[0];
const int stride = frame->linesize[0] >> 1;
+ uint16_t *src;
unsigned int bitstream_size, bytestream_size, wordstream_size, extra,
bytestream_offset, wordstream_offset;
+ src = (uint16_t *)f->last_picture->data[0];
+
if (f->version > 1) {
extra = 20;
if (length < extra)