validate: scenario: always unref srcpad
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 24 May 2016 14:05:10 +0000 (14:05 +0000)
committerThibault Saunier <tsaunier@gnome.org>
Tue, 24 May 2016 14:28:49 +0000 (10:28 -0400)
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D959

validate/gst/validate/gst-validate-scenario.c

index 53c4531..687f8c9 100644 (file)
@@ -741,12 +741,12 @@ find_input_selector (GValue * velement, const gchar * type)
               || g_str_has_prefix (mime, "subtitle/")
               || g_str_has_prefix (mime, "video/x-dvd-subpicture");
 
-        gst_object_unref (srcpad);
         if (found)
           result = 0;
       }
 
       gst_caps_unref (caps);
+      gst_object_unref (srcpad);
     }
   }
   return result;