Commit a41340f8 authored by Paul B Mahol's avatar Paul B Mahol Committed by Michael Niedermayer

pgmyuvenc: abort encoding if width is not even

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent eb74e9ea
......@@ -71,6 +71,10 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
n = avctx->width * 6;
break;
case PIX_FMT_YUV420P:
if (avctx->width & 1) {
av_log(avctx, AV_LOG_ERROR, "pgmyuv needs even width\n");
return AVERROR(EINVAL);
}
c = '5';
n = avctx->width;
h1 = (h * 3) / 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment