h264parse: Avoid ending up with undefined values

If caps aren't fixed, we'd end up with undefined values for format
and align.
This commit is contained in:
Edward Hervey 2013-10-28 09:33:16 +01:00
parent 64592da3e9
commit 77f254abb3

View file

@ -282,16 +282,16 @@ gst_h264_parse_get_string (GstH264Parse * parse, gboolean format, gint code)
static void
gst_h264_parse_format_from_caps (GstCaps * caps, guint * format, guint * align)
{
g_return_if_fail (gst_caps_is_fixed (caps));
GST_DEBUG ("parsing caps: %" GST_PTR_FORMAT, caps);
if (format)
*format = GST_H264_PARSE_FORMAT_NONE;
if (align)
*align = GST_H264_PARSE_ALIGN_NONE;
g_return_if_fail (gst_caps_is_fixed (caps));
GST_DEBUG ("parsing caps: %" GST_PTR_FORMAT, caps);
if (caps && gst_caps_get_size (caps) > 0) {
GstStructure *s = gst_caps_get_structure (caps, 0);
const gchar *str = NULL;