New submission from loopy123 <[email protected]>:

in libavfilter/vf_scale.c
at line 117 (of 217)
I added the MOD 2 to the "h" and "w" variables to ensure that the 
resulting calculated height and width is always divisible by two:


    if (w == -1)
        w = av_rescale(h, inlink->w, inlink->h) + ( av_rescale(w, 
inlink->h, inlink->w) % 2 );
    if (h == -1)
        h = av_rescale(w, inlink->h, inlink->w) + ( av_rescale(w, 
inlink->h, inlink->w) % 2 );


Appears to work great for me.

----------
messages: 11626
priority: normal
status: new
substatus: new
title: scaling video while maintaining aspect ratio using -vf 'scale=-1:320' 
errors stating must be multiple of 2
type: patch

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2158>
________________________________________________

Reply via email to