GNOME Bugzilla – Bug 793081
GStreamer crashes when volume is set to 0 for raw PCM audio data with sink timestamp sync turned off
Last modified: 2018-11-03 12:03:09 UTC
Our raw PCM data does not have timestamps for the pipeline and it causes volume plugin to crash with messages complaining about a timestamp expected when we set the volume to 0 or mute. Note that we use autoaudiosink with "sync=false" option. How to reproduce: gst-launch-1.0 -v filesrc location=rawpcm.wav ! decodebin ! queue ! audioconvert ! volume volume=0 ! autoaudiosink sync=false The version of this with volume set to non-zero value actually works: gst-launch-1.0 -v filesrc location=rawpcm.wav ! decodebin ! queue ! audioconvert ! volume volume=1 ! autoaudiosink sync=false
Most curious. Could you get a stack trace from gdb by any chance? What's the output of gst-launch-1.0 -v in your case? (I'm interested in the caps going into volume basically). Does it also happen with fakesink and/or audiotestsrc? If not, could you make available the .wav file somewhere?
Well, GStreamer is used as a binary library and all I can provide is this: (<unknown>:94175): GStreamer-CRITICAL **: gst_event_new_gap: assertion 'GST_CLOCK_TIME_IS_VALID (timestamp)' failed Exception: EXC_BAD_ACCESS (code=1, address=0x40) Well, I just realized that gst-launch actually reports EOS and it is probably not a reproduction of a problem, but here is the log anyway: ======== 8< ============== Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = audio/x-wav /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad2: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstVolume:volume0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink.GstProxyPad:proxypad1: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 Redistribute latency... /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstOsxAudioSink:autoaudiosink0-actual-sink-osxaudio.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstVolume:volume0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstAudioSinkClock Got EOS from element "pipeline0". Execution ended after 0:00:00.015417000 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... ======== 8< ============== And wave file is the first "raw pcm file example download" I found in google. http://www.music.helsinki.fi/tmt/opetus/uusmedia/esim/a2002011001-e02.wav I will try our code with these sink and source and will let you know the result later today.
Thanks. Can't reproduce on Linux unfortunately. It would be interesting to know where that gst_event_new_gap() comes from. You can make GLib abort at the warning by setting the G_DEBUG=fatal_warnings environment variable, and then get a stack trace of the location in a debugger. Could you also confirm which version of GStreamer you are using exactly? gst-inspect-1.0 decodebin | grep Version
Version is 1.12.3 I will try to create a code that reproduces the issue and let you know.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/416.