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 793081 - GStreamer crashes when volume is set to 0 for raw PCM audio data with sink timestamp sync turned off
GStreamer crashes when volume is set to 0 for raw PCM audio data with sink ti...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.x
Other Mac OS
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-31 21:48 UTC by Andrei Mikheev
Modified: 2018-11-03 12:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrei Mikheev 2018-01-31 21:48:54 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
Comment 1 Tim-Philipp Müller 2018-01-31 23:50:45 UTC
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?
Comment 2 Andrei Mikheev 2018-02-01 17:52:32 UTC
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.
Comment 3 Tim-Philipp Müller 2018-02-01 19:04:37 UTC
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
Comment 4 Andrei Mikheev 2018-02-01 19:24:33 UTC
Version is 1.12.3

I will try to create a code that reproduces the issue and let you know.
Comment 5 GStreamer system administrator 2018-11-03 12:03:09 UTC
-- 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.