GNOME Bugzilla – Bug 342454
Adder causes problems setting the state back to PLAYING
Last modified: 2006-05-22 16:31:30 UTC
Please describe the problem: Recently I have been having problems with playback, and I think I have narrowed this down to the adder. I can set the pipeline to PLAYING the first time fine, and then set it back to READY, but setting it back to PLAYING again will cause problems and generate a bus error message. This bug is seen when playing multiple audio files at the same time using the adder. The reason I think its the adder is that when I play a *single* audio file (through the adder), everything works fine. The problem is only with multiple audio files being played through the adder. Attached to this bug is a self-contained script that demonstrates the bug. It pops up a simple window with a play, stop and quit button. Press play and it plays fine the first time, press stop to stop, press play again and it typically fails to play. Oddly, sometimes the audio will play fine for a number of times, and then stop working after a few plays - suggesting even further that this is a bug. The example program includes a bus message callback to output bus messages. When testing the program, change the location of the audio files around line 80. Make sure the glade file is in the same dir as the script. The example script plays back two audio files at the same time. If you comment out the second audio file line around line 81, you can see that everything works fine with a single audio file. The example program uses gnonlin, but to test this isn't a bug in gnonlin, I converted it to use a filesrc and decodebin, and the problem is still there. Steps to reproduce: 1. Play more than one audio file at the same time. 2. Set the state to PLAYING and then back to READY 3. Set the state to PLAYING again and playback will not occur. Actual results: Playback does not happen. Expected results: Playback should work fine. Does this happen every time? In around 90% of cases the bug exhibits itself on the second play, sometimes it is after a play successful plays. Other information:
Created attachment 65923 [details] Test case to demonstrate this bug
Created attachment 65924 [details] Glade file for use with adderbug.py
first block is when it works, second when it fails: play (<enum GST_STATE_CHANGE_ASYNC of type GstStateChangeReturn>, <enum GST_STATE_READY of type GstState>, <enum GST_STATE_PLAYING of type GstState>) pad added! DEBUG (0x83a10f0 - 0:00:10.953541000) adder(17568) gstadder.c(416):gst_adder_sink_event: Got newsegment event on pad masteradder:sink1 DEBUG (0x83a10f0 - 0:00:11.007162000) adder(17568) gstadder.c(179):gst_adder_setcaps:<masteradder> parse_caps sets adder to format int pad added! DEBUG (0x83b4278 - 0:00:11.064208000) adder(17568) gstadder.c(416):gst_adder_sink_event: Got newsegment event on pad masteradder:sink0 stop (<enum GST_STATE_CHANGE_SUCCESS of type GstStateChangeReturn>, <enum GST_STATE_READY of type GstState>, <enum GST_STATE_VOID_PENDING of type GstState>) play (<enum GST_STATE_CHANGE_ASYNC of type GstStateChangeReturn>, <enum GST_STATE_READY of type GstState>, <enum GST_STATE_PLAYING of type GstState>) pad added! DEBUG (0x83a10f0 - 0:00:19.579377000) adder(17568) gstadder.c(416):gst_adder_sink_event: Got newsegment event on pad masteradder:sink1 DEBUG (0x83a10f0 - 0:00:19.632322000) adder(17568) gstadder.c(179):gst_adder_setcaps:<masteradder> parse_caps sets adder to format int DEBUG (0x83a10f0 - 0:00:19.633037000) adder(17568) gstadder.c(693):gst_adder_collected:<masteradder> no data available, must be EOS pad added! DEBUG (0x83d8e70 - 0:00:19.696646000) adder(17568) gstadder.c(416):gst_adder_sink_event: Got newsegment event on pad masteradder:sink0 DEBUG (0x83a10f0 - 0:00:19.772125000) adder(17568) gstadder.c(416):gst_adder_sink_event: Got eos event on pad masteradder:sink1 DEBUG (0x83d8e70 - 0:00:19.775237000) adder(17568) gstadder.c(693):gst_adder_collected:<masteradder> no data available, must be EOS DEBUG (0x83d8e70 - 0:00:19.809703000) adder(17568) gstadder.c(416):gst_adder_sink_event: Got eos event on pad masteradder:sink0 DEBUG (0x83d8e70 - 0:00:19.810019000) adder(17568) gstadder.c(693):gst_adder_collected:<masteradder> no data available, must be EOS DEBUG (0x83a10f0 - 0:00:19.821062000) adder(17568) gstadder.c(693):gst_adder_collected:<masteradder> no data available, must be EOS stop (<enum GST_STATE_CHANGE_SUCCESS of type GstStateChangeReturn>, <enum GST_STATE_READY of type GstState>, <enum GST_STATE_VOID_PENDING of type GstState>)
Created attachment 65936 [details] [review] flush buffers when stopping collectpads