rtph265depay: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Remove calls to gst_pad_has_current_caps() which then go on to call gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just use gst_pad_get_current_caps() and check for NULL. https://bugzilla.gnome.org/show_bug.cgi?id=759539
This commit is contained in:
parent
211c8492b3
commit
9b2e1f9f36
@ -296,6 +296,7 @@ static gboolean
|
|||||||
gst_rtp_h265_set_src_caps (GstRtpH265Depay * rtph265depay)
|
gst_rtp_h265_set_src_caps (GstRtpH265Depay * rtph265depay)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
GstCaps *old_caps;
|
||||||
GstCaps *srccaps;
|
GstCaps *srccaps;
|
||||||
|
|
||||||
if (!rtph265depay->byte_stream &&
|
if (!rtph265depay->byte_stream &&
|
||||||
@ -507,9 +508,9 @@ gst_rtp_h265_set_src_caps (GstRtpH265Depay * rtph265depay)
|
|||||||
gst_buffer_unref (codec_data);
|
gst_buffer_unref (codec_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gst_pad_has_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay))) {
|
old_caps =
|
||||||
GstCaps *old_caps =
|
gst_pad_get_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay));
|
||||||
gst_pad_get_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay));
|
if (old_caps != NULL) {
|
||||||
|
|
||||||
/* Only update the caps if they are not equal. For
|
/* Only update the caps if they are not equal. For
|
||||||
* AVC we don't update caps if only the codec_data
|
* AVC we don't update caps if only the codec_data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user