Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 17 Aug 2013 08:36:19 +0000 (10:36 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 17 Aug 2013 09:19:03 +0000 (11:19 +0200)
* qatar/master:
  dxa: Make sure the reference frame exists

See: 12eb2fd5394813a6119912b22f5dfc17b4a6b4a0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dxa.c

index 985b9da..5991c91 100644 (file)
@@ -262,6 +262,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
     case 3:
     case 4:
     case 5:
+        if (!tmpptr) {
+            av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
+            return AVERROR_INVALIDDATA;
+        }
         frame->key_frame = !(compr & 1);
         frame->pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
         for(j = 0; j < avctx->height; j++){