audiodecoder: Don't get and parse the current srcpad caps

We only get here if we don't have any srcpad caps, and we're going
to override the GstAudioInfo a few lines below anyway without ever
using it if for whatever reason we get caps here.
This commit is contained in:
Sebastian Dröge 2015-04-08 20:48:39 -07:00
parent f268f2be92
commit 9196c3dcca

View file

@ -1890,12 +1890,6 @@ gst_audio_decoder_negotiate_default_caps (GstAudioDecoder * dec)
gint caps_size; gint caps_size;
GstStructure *structure; GstStructure *structure;
caps = gst_pad_get_current_caps (dec->srcpad);
if (caps && !gst_audio_info_from_caps (&dec->priv->ctx.info, caps))
goto caps_error;
if (caps)
gst_caps_unref (caps);
caps = gst_pad_get_allowed_caps (dec->srcpad); caps = gst_pad_get_allowed_caps (dec->srcpad);
if (!caps || gst_caps_is_empty (caps) || gst_caps_is_any (caps)) if (!caps || gst_caps_is_empty (caps) || gst_caps_is_any (caps))
goto caps_error; goto caps_error;