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:
parent
64592da3e9
commit
77f254abb3
@ -282,16 +282,16 @@ gst_h264_parse_get_string (GstH264Parse * parse, gboolean format, gint code)
|
|||||||
static void
|
static void
|
||||||
gst_h264_parse_format_from_caps (GstCaps * caps, guint * format, guint * align)
|
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)
|
if (format)
|
||||||
*format = GST_H264_PARSE_FORMAT_NONE;
|
*format = GST_H264_PARSE_FORMAT_NONE;
|
||||||
|
|
||||||
if (align)
|
if (align)
|
||||||
*align = GST_H264_PARSE_ALIGN_NONE;
|
*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) {
|
if (caps && gst_caps_get_size (caps) > 0) {
|
||||||
GstStructure *s = gst_caps_get_structure (caps, 0);
|
GstStructure *s = gst_caps_get_structure (caps, 0);
|
||||||
const gchar *str = NULL;
|
const gchar *str = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user