Unref active pad from selector when finding active stream.
authorMichael Smith <msmith@songbirdnest.com>
Fri, 30 Jan 2009 18:51:11 +0000 (10:51 -0800)
committerMichael Smith <msmith@songbirdnest.com>
Sat, 31 Jan 2009 02:30:10 +0000 (18:30 -0800)
gst/playback/gstplaybin2.c

index d6cd55c..b38185a 100644 (file)
@@ -1205,9 +1205,13 @@ get_current_stream_number (GstPlayBin * playbin, GPtrArray * channels)
       g_object_get (selector, "active-pad", &current, NULL);
 
       if (pad == current) {
+        gst_object_unref (current);
         ret = i;
         break;
       }
+
+      if (current)
+        gst_object_unref (current);
     }
   }