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>
Sun, 17 Sep 2017 10:21:32 +0000 (12:21 +0200)
commit36c0958fbd9f85e2e263ef9b97eda26d49d439b4
treeb7d40bb5f9c884d72de35cf8b370d70f1d923c3d
parent4e4177dde23be77a97887f409f237e17ef53f329
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