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 352827 - re-negotiation issues with dynamic pipelines and level or volume.
re-negotiation issues with dynamic pipelines and level or volume.
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
Other Linux
: Normal normal
: 0.10.11
Assigned To: Edward Hervey
GStreamer Maintainers
Depends on:
Reported: 2006-08-25 10:59 UTC by Jono Bacon
Modified: 2006-11-30 22:21 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14

Sample program to demonstrate the bug (4.20 KB, text/plain)
2006-08-25 11:00 UTC, Jono Bacon
Glade file for use with the bug (2.75 KB, application/xml)
2006-08-25 11:01 UTC, Jono Bacon
Test case for the bug (4.73 KB, text/plain)
2006-08-25 11:11 UTC, Jono Bacon
Fix for bufferalloc (1.86 KB, patch)
2006-09-08 10:41 UTC, Edward Hervey
committed Details | Review

Description Jono Bacon 2006-08-25 10:59:23 UTC
If you create a composition with two file sources and the following settings:

  self.audio1.set_property("location", filename)
  self.audio1.set_property("start", long(0))
  self.audio1.set_property("duration", long(2) * gst.SECOND)
  self.audio1.set_property("media-start", 10 * gst.SECOND)
  self.audio1.set_property("media-duration", 2 * gst.SECOND)

  self.audio2.set_property("location", filename)
  self.audio2.set_property("start", long(4))
  self.audio2.set_property("duration", long(2) * gst.SECOND)
  self.audio2.set_property("media-start", 10 * gst.SECOND)
  self.audio2.set_property("media-duration", 2 * gst.SECOND)

the playback never gets to the second gnlfilesource.

Attached is a program that demonstrates the bug.
Comment 1 Jono Bacon 2006-08-25 11:00:40 UTC
Created attachment 71583 [details]
Sample program to demonstrate the bug
Comment 2 Jono Bacon 2006-08-25 11:01:16 UTC
Created attachment 71584 [details]
Glade file for use with the bug
Comment 3 Jono Bacon 2006-08-25 11:11:37 UTC
Created attachment 71587 [details]
Test case for the bug
Comment 4 Edward Hervey 2006-08-25 11:28:19 UTC
This is not an issue in gnonlin, it works perfectly fine if you remove the level and volume elements which are outside the gnlcomposition.

It seems to be an issue with re-negotation. As in it plays the first source fine (ogg, float audio), then the default source, but when it switches to the second source (which is the same file as the first source) it fails to negotiate.

Changing title and category.
Comment 5 Edward Hervey 2006-09-07 13:57:53 UTC
have a guess... basetransform is the culprit :(
Comment 6 Edward Hervey 2006-09-08 10:41:32 UTC
Created attachment 72410 [details] [review]
Fix for bufferalloc
Comment 7 Edward Hervey 2006-09-08 10:44:40 UTC
The problem is that base_transform_buffer_alloc() is doing NO checks whatsoever when ->have_same_caps is set to TRUE, it just blindly calls buffer_alloc() on the src pad.

The proposed fix will, if ->have_same_caps is TRUE, check the requested caps against the caps of the sink pad. If they are different, base_transform_buffer_alloc() will behave as if have_same_caps() is FALSE.
Comment 8 Edward Hervey 2006-09-16 12:50:48 UTC
Commited. We definitely need some unit test in -good/-base for basetransform-based elements in order to make sure these issues don't re-appear later on.

2006-09-16  Edward Hervey  <>

	* libs/gst/base/gstbasetransform.c:
	Check if requested caps are the same as the sinks caps IF
	->have_same_caps is TRUE. If they are not, act as if have_same_caps
	is FALSE.
	This fixes the renegotiation issues stated in #352827.

Comment 9 Edward Hervey 2006-09-16 16:36:01 UTC
I added a high-level test in gnonlin for this behaviour.

2006-09-16  Edward Hervey  <>

	* tests/check/common.h:
	Added convenience function to create a int/float audiotest gnlsource.
	* tests/check/complex.c: (GST_START_TEST), (gnonlin_suite):
	Added test_renegotiation to test re-negotiation error seen in #352827