GST_DEBUG_OBJECT (h264parse, "setting new codec_data");
gst_caps_set_simple (src_caps, "codec_data", GST_TYPE_BUFFER, buf,
NULL);
- gst_buffer_unref (buf);
modified = TRUE;
}
+ gst_buffer_unref (buf);
} else {
GST_DEBUG_OBJECT (h264parse, "no codec_data yet");
}
/* save as new caps, caps will be set when pushing data */
/* avoid replacing caps by a mere identical copy, thereby triggering
* negotiating (which e.g. some container might not appreciate) */
- if (modified) {
+ if (modified)
gst_caps_replace (&h264parse->src_caps, src_caps);
- gst_caps_unref (src_caps);
- }
+ gst_caps_unref (src_caps);
return TRUE;
}