diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-09-18 17:29:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-09-18 17:50:50 +0100 |
commit | c6ffef554988a62c26172c229210c91e1de934e5 (patch) | |
tree | fcc3b705f1a47da0d79d1843a4b9089e75f81ed2 /avmedia/source/gstreamer | |
parent | 96111e25e16aac27e919eedec98f945a6f0f1f61 (diff) |
gstreamer: fix leaking pads.
Change-Id: Ie0ffb62c4f75f8af9c2268c07dfabf14ba036115
Diffstat (limited to 'avmedia/source/gstreamer')
-rw-r--r-- | avmedia/source/gstreamer/gstplayer.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index b28e6a5d65cf..afb97cf6ebf2 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -268,6 +268,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) gst_structure_get_int( pStructure, "height", &mnHeight ); DBG( "queried size: %d x %d", mnWidth, mnHeight ); } + g_object_unref (pPad); } } @@ -294,18 +295,19 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) caps = gst_pad_get_current_caps( pad ); - if( gst_structure_get( gst_caps_get_structure (caps, 0), + if( gst_structure_get( gst_caps_get_structure( caps, 0 ), "width", G_TYPE_INT, &w, "height", G_TYPE_INT, &h, NULL ) ) { mnWidth = w; mnHeight = h; - fprintf (stderr, "queried size: %d x %d", mnWidth, mnHeight ); + fprintf( stderr, "queried size: %d x %d", mnWidth, mnHeight ); maSizeCondition.set(); } gst_caps_unref( caps ); + g_object_unref( pad ); } } #endif |