The AVI demuxer (avidemux) does not set a proper "format" attribute
to the generated caps. So, try to recover the video codec format from
the "wmvversion" property instead.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
guint buf_size, ofs;
gint width, height;
guint32 format;
+ gint version;
buf = GST_BUFFER_DATA(buffer);
buf_size = GST_BUFFER_SIZE(buffer);
}
if (!gst_structure_get_fourcc(structure, "format", &format)) {
+ /* Try to determine format from "wmvversion" property */
+ if (gst_structure_get_int(structure, "wmvversion", &version))
+ format = (version >= 1 && version <= 3) ?
+ GST_MAKE_FOURCC('W','M','V',('0'+version)) : 0;
+ }
+ if (!format) {
GST_ERROR("failed to parse profile from codec-data");
return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CODEC;
}