After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734384 - playbin: "convert-sample" returns a sample with an initial refCount of 2
playbin: "convert-sample" returns a sample with an initial refCount of 2
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.2.1
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-06 21:45 UTC by Chris Tapp
Modified: 2016-02-21 23:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample code showing refCount issue (1.83 KB, text/x-c++src)
2014-08-06 21:45 UTC, Chris Tapp
Details

Description Chris Tapp 2014-08-06 21:45:05 UTC
Created attachment 282745 [details]
Sample code showing refCount issue

Given the following pipeline:

playbin uri=http://media.w3.org/2010/05/sintel/trailer.webm

I'm calling g_signal_emit_by_name() to obtain a sample converted to a defined format using "convert-sample".

The sample returned has an initial refCount of 2, rather than the expected value of 1. This has been confirmed by checking the GST_OBJECT_REFCOUNT_VALUE as soon as the sample is returned.

The code in the attached file (sorry for the hack!) demonstrates the problem.
Comment 1 Tim-Philipp Müller 2014-08-06 22:38:20 UTC
Thanks for the bug report and the test case to reproduce it.

I can't reproduce this myself with your test code, however. I've tried the tip of the 1.2 branch (after 1.2.4) and git master.

I've added a

		if ( GST_STATE_CHANGE_FAILURE == gst_element_get_state ( pipeline, NULL, NULL, -1 ) )
 		{
			throw "Failed to preroll!";
		}

to your code after the gst_element_set_state ( pipeline, GST_STATE_PLAYING ) to make it wait until prerolled.

There's one bug in your test program: GstSample is not a GstObject, it's a GstMiniObject, hence the refcount should be queried using GST_MINI_OBJECT_REFCOUNT_VALUE(frame) and not GST_OBJECT_REFCOUNT_VALUE(frame).
Comment 2 Chris Tapp 2014-08-06 23:00:33 UTC
Thanks, I've updated to use GST_MINI_OBJECT_REFCOUNT_VALUE, but I'm still getting the same ref counts reported.

My system is Ubuntu 12.04 and the ppa only goes up to 1.2.1 - I'll have a go at getting a later version built and installed.
Comment 3 Tim-Philipp Müller 2016-02-21 23:41:59 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!