mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00: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:
parent
eb74e9ea10
commit
a41340f8e8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user