summaryrefslogtreecommitdiff
path: root/libavcodec/dxa.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-17 10:36:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-17 11:19:03 +0200
commit7a342f97c48f529d93aa46e572944d279c1dd697 (patch)
treec2067a6b1da721251f351c6e23d662ec138ef8f6 /libavcodec/dxa.c
parentbd71071066602a9aa542286829f33eddc9bec615 (diff)
parent5ef7c84a9374681c64722a96d91741f3b990af2b (diff)
downloadffmpeg-7a342f97c48f529d93aa46e572944d279c1dd697.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: dxa: Make sure the reference frame exists See: 12eb2fd5394813a6119912b22f5dfc17b4a6b4a0 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dxa.c')
-rw-r--r--libavcodec/dxa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 985b9dab3f..5991c91d0e 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -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++){