summaryrefslogtreecommitdiff
path: root/libavcodec/qpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/qpeg.c')
-rw-r--r--libavcodec/qpeg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c
index 20f166329d..6b5d8732d9 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -289,6 +289,10 @@ static int decode_frame(AVCodecContext *avctx,
static av_cold int decode_init(AVCodecContext *avctx){
QpegContext * const a = avctx->priv_data;
+ if (!avctx->palctrl) {
+ av_log(avctx, AV_LOG_FATAL, "Missing required palette via palctrl\n");
+ return -1;
+ }
a->avctx = avctx;
avctx->pix_fmt= PIX_FMT_PAL8;
a->refdata = av_malloc(avctx->width * avctx->height);