mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
h264parse: only update src CAPS when it's necessary
https://bugzilla.gnome.org/show_bug.cgi?id=705452
This commit is contained in:
parent
43dcebe2a0
commit
4b10f278b6
1 changed files with 8 additions and 2 deletions
|
@ -1150,7 +1150,7 @@ static void
|
|||
gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
|
||||
{
|
||||
GstH264SPS *sps;
|
||||
GstCaps *sink_caps;
|
||||
GstCaps *sink_caps, *src_caps;
|
||||
gboolean modified = FALSE;
|
||||
GstBuffer *buf = NULL;
|
||||
GstStructure *s = NULL;
|
||||
|
@ -1323,7 +1323,13 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
|
|||
gst_structure_remove_field (s, "codec_data");
|
||||
gst_buffer_replace (&h264parse->codec_data, NULL);
|
||||
}
|
||||
gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (h264parse), caps);
|
||||
|
||||
src_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (h264parse));
|
||||
if (!(src_caps && gst_caps_is_strictly_equal (src_caps, caps)))
|
||||
gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (h264parse), caps);
|
||||
|
||||
if (src_caps)
|
||||
gst_caps_unref (src_caps);
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue