1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-08 22:39:44 +02:00
FFmpeg/libavfilter
Kevin Mark 05feeeb813 libavfilter/scale: Populate ow/oh when using 0 as w/h
The input width and height is known at parse time so there's no
reason ow/oh should not be usable when using 0 as the width or
height expression.

Previously in "scale=0:ow" ow would be set to "0" which works,
conveniently, as "scale=0:0" is perfectly valid input but this breaks
down when you do something like "scale=0:ow/4" which one could
reasonably expect to work as well, but does not as ow is 0 not the
real value.

This change handles the 0 case for w/h immediately so the ow/oh
variables work as expected. Consequently, the rest of the code does
not need to handle 0 input. w/h will always be > 0 or < 0.

The second explicit (int) cast ensures that ow/oh appear as integers
as a user might expect when dealing with pixel dimensions.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-06-19 14:27:52 -04:00
..
2017-05-12 10:48:13 +02:00
2017-06-18 21:06:54 +02:00
2017-04-23 14:40:30 +07:00
2017-04-23 14:40:30 +07:00
2017-04-23 14:40:30 +07:00
2017-06-19 14:04:44 +02:00
2017-04-23 14:40:30 +07:00
2017-06-19 14:04:44 +02:00
2017-04-10 16:53:17 +02:00
2017-04-23 14:40:30 +07:00
2017-04-24 20:37:30 +02:00
2017-04-23 14:40:30 +07:00
2017-01-30 18:44:08 +01:00
2017-04-22 13:18:59 +02:00