aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/sipr_parser.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-16 15:34:06 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-22 03:57:52 +0100
commite8f390160438923ae2dadfe1dc44bb3211a587ee (patch)
tree5411bfc565563e2a45f2bacf140bdc5a96b29926 /libavcodec/sipr_parser.c
parent5b9a0e6031eee5df2e0d6a35862908c6a017f490 (diff)
downloadffmpeg-e8f390160438923ae2dadfe1dc44bb3211a587ee.tar.gz
avformat/matroskadec: Check min_luminance more thoroughly
In the absence of an explicitly coded minimal luminance, the current code inferred it to be -1, an invalid value. Yet it did not check the value lateron at all, so that if a valid maximum luminance is encountered, but no minimal luminance, an invalid minimal luminance of -1 is exported. If an minimal luminance element with a negative value is present, it is exported, too. This can be simply fixed by adding a check for the value of the element. Yet given that a minimal luminance of zero Cd/m² is legal and can be coded with a length of zero, we must not use a fake default value to find out whether the element is present or not. Therefore this patch uses an explicit counter for it. While just at it, also check for max_luminance > min_luminance. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/sipr_parser.c')
0 files changed, 0 insertions, 0 deletions