Commit 72bc7d7f authored by Matthew Waters's avatar Matthew Waters
Browse files

h264parse: increase caps equality check for no codec_data

When converting from avc to byte-stream, there will not be any codec_data
in the src caps.  Remove it before the equality check to avoid sending caps
events downstream on every SPS/PPS change.
parent f352691a
......@@ -1863,14 +1863,20 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
src_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (h264parse));
if (src_caps
&& gst_structure_has_field (gst_caps_get_structure (src_caps, 0),
"codec_data")) {
if (src_caps) {
/* use codec data from old caps for comparison; we don't want to resend caps
if everything is same except codec data; */
gst_caps_set_value (caps, "codec_data",
gst_structure_get_value (gst_caps_get_structure (src_caps, 0),
if (gst_structure_has_field (gst_caps_get_structure (src_caps, 0),
"codec_data")) {
gst_caps_set_value (caps, "codec_data",
gst_structure_get_value (gst_caps_get_structure (src_caps, 0),
} else if (!buf) {
GstStructure *s;
/* remove any left-over codec-data hanging around */
s = gst_caps_get_structure (caps, 0);
gst_structure_remove_field (s, "codec_data");
if (!(src_caps && gst_caps_is_strictly_equal (src_caps, caps))) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment