{
gboolean res;
GstCaps *srccaps;
+ GstCaps *old_caps;
if (!rtph264depay->byte_stream &&
(!rtph264depay->new_codec_data ||
}
- if (gst_pad_has_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay))) {
- GstCaps *old_caps =
- gst_pad_get_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay));
+ old_caps =
+ gst_pad_get_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay));
+ if (old_caps != NULL) {
/* Only update the caps if they are not equal. For
* AVC we don't update caps if only the codec_data
* changes. This is the same behaviour as in h264parse
gst_caps_unref (tmp_caps);
}
+ gst_caps_unref (old_caps);
} else {
res =
gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay),