You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
pgmyuvenc: abort encoding if width is not even
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
eb74e9ea10
commit
a41340f8e8
@@ -71,6 +71,10 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
n = avctx->width * 6;
|
n = avctx->width * 6;
|
||||||
break;
|
break;
|
||||||
case PIX_FMT_YUV420P:
|
case PIX_FMT_YUV420P:
|
||||||
|
if (avctx->width & 1) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "pgmyuv needs even width\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
c = '5';
|
c = '5';
|
||||||
n = avctx->width;
|
n = avctx->width;
|
||||||
h1 = (h * 3) / 2;
|
h1 = (h * 3) / 2;
|
||||||
|
Reference in New Issue
Block a user