mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
vc1: fix use of possibly uninitialized variable.
In decode_codec_data(), force initialization of format to zero so that we can catch up cases where codec-data has neither "format" nor "wmvversion" fields, thus making it possible to gracefully fail in this case.
This commit is contained in:
parent
2c6e235e4d
commit
2000d5d6e1
1 changed files with 2 additions and 0 deletions
|
@ -1097,6 +1097,8 @@ gst_vaapi_decoder_vc1_decode_codec_data(GstVaapiDecoder *base_decoder,
|
|||
if (gst_structure_get_int(structure, "wmvversion", &version))
|
||||
format = (version >= 1 && version <= 3) ?
|
||||
GST_MAKE_FOURCC('W','M','V',('0'+version)) : 0;
|
||||
else
|
||||
format = 0;
|
||||
}
|
||||
if (!format) {
|
||||
GST_ERROR("failed to parse profile from codec-data");
|
||||
|
|
Loading…
Reference in a new issue