mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
playsinkaudioconvert: Fix warning when there is no target pad yet
This commit is contained in:
parent
cf9da5c280
commit
f35c51c149
1 changed files with 7 additions and 3 deletions
|
@ -348,13 +348,18 @@ gst_play_sink_audio_convert_getcaps (GstPad * pad)
|
|||
GstPlaySinkAudioConvert *self =
|
||||
GST_PLAY_SINK_AUDIO_CONVERT (gst_pad_get_parent (pad));
|
||||
GstCaps *ret;
|
||||
GstPad *otherpad, *peer;
|
||||
GstPad *otherpad, *peer = NULL;
|
||||
|
||||
GST_PLAY_SINK_AUDIO_CONVERT_LOCK (self);
|
||||
otherpad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad));
|
||||
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
|
||||
|
||||
peer = gst_pad_get_peer (otherpad);
|
||||
if (otherpad) {
|
||||
peer = gst_pad_get_peer (otherpad);
|
||||
gst_object_unref (otherpad);
|
||||
otherpad = NULL;
|
||||
}
|
||||
|
||||
if (peer) {
|
||||
ret = gst_pad_get_caps_reffed (peer);
|
||||
gst_object_unref (peer);
|
||||
|
@ -362,7 +367,6 @@ gst_play_sink_audio_convert_getcaps (GstPad * pad)
|
|||
ret = gst_caps_new_any ();
|
||||
}
|
||||
|
||||
gst_object_unref (otherpad);
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue