audio/videodecoder: Minor cleanup of last commit

https://bugzilla.gnome.org/show_bug.cgi?id=761218
This commit is contained in:
HoonHee Lee 2016-01-28 13:21:33 +01:00 committed by Sebastian Dröge
parent 15df3c812b
commit dfa2f49523
2 changed files with 6 additions and 10 deletions

View file

@ -1960,13 +1960,11 @@ gst_audio_decoder_negotiate_default_caps (GstAudioDecoder * dec)
templcaps = gst_pad_get_pad_template_caps (dec->srcpad); templcaps = gst_pad_get_pad_template_caps (dec->srcpad);
caps = gst_pad_peer_query_caps (dec->srcpad, templcaps); caps = gst_pad_peer_query_caps (dec->srcpad, templcaps);
if (caps) { if (caps)
gst_caps_unref (templcaps); gst_caps_unref (templcaps);
templcaps = NULL; else
} else {
caps = templcaps; caps = templcaps;
templcaps = NULL; templcaps = NULL;
}
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;

View file

@ -1098,13 +1098,11 @@ gst_video_decoder_negotiate_default_caps (GstVideoDecoder * decoder)
templcaps = gst_pad_get_pad_template_caps (decoder->srcpad); templcaps = gst_pad_get_pad_template_caps (decoder->srcpad);
caps = gst_pad_peer_query_caps (decoder->srcpad, templcaps); caps = gst_pad_peer_query_caps (decoder->srcpad, templcaps);
if (caps) { if (caps)
gst_caps_unref (templcaps); gst_caps_unref (templcaps);
templcaps = NULL; else
} else {
caps = templcaps; caps = templcaps;
templcaps = NULL; templcaps = NULL;
}
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;