diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c index 67bc839efb..d8b69b3b30 100644 --- a/libavcodec/pcx.c +++ b/libavcodec/pcx.c @@ -174,7 +174,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } if (bytestream2_get_byte(&gb) != 12) { av_log(avctx, AV_LOG_ERROR, "expected palette after image data\n"); - ret = AVERROR_INVALIDDATA; + ret = avpkt->size; goto end; } } else if (nplanes == 1) { /* all packed formats, max. 16 colors */