From: Mark Nauwelaerts Date: Mon, 21 Mar 2011 16:44:17 +0000 (+0100) Subject: basevideoencoder: simplify negotiated checking X-Git-Tag: 1.19.3~507^2~16050^2~248 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72a32afc65e2a6f4a55f5147f7cb1f057781b67b;p=platform%2Fupstream%2Fgstreamer.git basevideoencoder: simplify negotiated checking ... by avoiding some extraneous (un)ref'ing. --- diff --git a/gst-libs/gst/video/gstbasevideoencoder.c b/gst-libs/gst/video/gstbasevideoencoder.c index e05de53..12f71b8 100644 --- a/gst-libs/gst/video/gstbasevideoencoder.c +++ b/gst-libs/gst/video/gstbasevideoencoder.c @@ -384,22 +384,6 @@ error: return res; } -static gboolean -gst_pad_is_negotiated (GstPad * pad) -{ - GstCaps *caps; - - g_return_val_if_fail (pad != NULL, FALSE); - - caps = gst_pad_get_negotiated_caps (pad); - if (caps) { - gst_caps_unref (caps); - return TRUE; - } - - return FALSE; -} - static GstFlowReturn gst_base_video_encoder_chain (GstPad * pad, GstBuffer * buf) { @@ -412,7 +396,7 @@ gst_base_video_encoder_chain (GstPad * pad, GstBuffer * buf) g_return_val_if_fail (klass->handle_frame != NULL, GST_FLOW_ERROR); - if (!gst_pad_is_negotiated (pad)) { + if (!GST_PAD_CAPS (pad)) { return GST_FLOW_NOT_NEGOTIATED; }