aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_cabac.c
diff options
context:
space:
mode:
authorKevin Mark <kmark937@gmail.com>2017-06-14 01:03:18 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2017-06-19 14:27:52 -0400
commit05feeeb813e9f71f69b6b3a7f33856c609237c06 (patch)
tree73f8668ea490f37599967cb27877f49b18118cb4 /libavcodec/h264_cabac.c
parent5aea18cbd8828da885d76d528fcbf5b2fd6834ca (diff)
downloadffmpeg-05feeeb813e9f71f69b6b3a7f33856c609237c06.tar.gz
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>
Diffstat (limited to 'libavcodec/h264_cabac.c')
0 files changed, 0 insertions, 0 deletions