libavcodec/h264_parse: don't use uninitialized value when chroma_format_idc==0
authorMark Wachsler <wachsler-at-google.com@ffmpeg.org>
Thu, 7 Sep 2017 13:42:07 +0000 (09:42 -0400)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 9 Sep 2017 23:33:28 +0000 (01:33 +0200)
commit1df91b48a39abfa62bc40ca53b1225631ba110ca
tree947cc98c5eca304c1bcb0efee6eacccd69f686aa
parentb61e5a878c845b8bee1267fdb75c293feb00ae0d
libavcodec/h264_parse: don't use uninitialized value when chroma_format_idc==0

When parsing a monochrome file, chroma_log2_weight_denom was used without
being initialized, which could lead to a bogus error message being printed, e.g.
  [h264 @ 0x61a000026480] chroma_log2_weight_denom 24576 is out of range
It also could led to warnings using AddressSanitizer.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fde5c7dc79eb017790ba232442ad2a4eecea4bf1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/h264_parse.c