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:
Gwenole Beauchesne 2013-03-21 13:32:15 +01:00
parent 2c6e235e4d
commit 2000d5d6e1

View file

@ -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");