From 02335ef953be87bc46ddb731788fa9093cbbc00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 14 Mar 2013 15:03:02 +0100 Subject: omx: Only unref caps after usage of its fields --- omx/gstomxh263enc.c | 4 ++-- omx/gstomxh264enc.c | 4 ++-- omx/gstomxmpeg4videoenc.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/omx/gstomxh263enc.c b/omx/gstomxh263enc.c index 2fea91e..e3c1a99 100644 --- a/omx/gstomxh263enc.c +++ b/omx/gstomxh263enc.c @@ -197,13 +197,13 @@ gst_omx_h263_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port, return TRUE; unsupported_profile: - gst_caps_unref (peercaps); GST_ERROR_OBJECT (self, "Unsupported profile %u", profile_id); + gst_caps_unref (peercaps); return FALSE; unsupported_level: - gst_caps_unref (peercaps); GST_ERROR_OBJECT (self, "Unsupported level %u", level_id); + gst_caps_unref (peercaps); return FALSE; } diff --git a/omx/gstomxh264enc.c b/omx/gstomxh264enc.c index 75f7897..9adac04 100644 --- a/omx/gstomxh264enc.c +++ b/omx/gstomxh264enc.c @@ -200,13 +200,13 @@ gst_omx_h264_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port, return TRUE; unsupported_profile: - gst_caps_unref (peercaps); GST_ERROR_OBJECT (self, "Unsupported profile %s", profile_string); + gst_caps_unref (peercaps); return FALSE; unsupported_level: - gst_caps_unref (peercaps); GST_ERROR_OBJECT (self, "Unsupported level %s", level_string); + gst_caps_unref (peercaps); return FALSE; } diff --git a/omx/gstomxmpeg4videoenc.c b/omx/gstomxmpeg4videoenc.c index 14dfc34..15b8ce7 100644 --- a/omx/gstomxmpeg4videoenc.c +++ b/omx/gstomxmpeg4videoenc.c @@ -207,13 +207,13 @@ gst_omx_mpeg4_video_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port, return TRUE; unsupported_profile: - gst_caps_unref (intersection); GST_ERROR_OBJECT (self, "Unsupported profile %s", profile_string); + gst_caps_unref (intersection); return FALSE; unsupported_level: - gst_caps_unref (intersection); GST_ERROR_OBJECT (self, "Unsupported level %s", level_string); + gst_caps_unref (intersection); return FALSE; } -- cgit v1.2.1