GNOME Bugzilla – Bug 777123
wavparse: CRITICAL warning with injected flush stop event in pull mode
Last modified: 2017-01-25 12:29:41 UTC
Created attachment 343277 [details] test wav file When playing local wav file, if we flush the pipeline using flush start/stop event, we get following CRITICAL warning: CRITICAL **: gst_adapter_clear: assertion 'GST_IS_ADAPTER (adapter)' failed
Created attachment 343278 [details] [review] Patch to fix warning Please find attached patch to fix CRITICAL warning.
Thanks for the bug report and the patch. Could you provide a little more context? What's the pipeline exactly and how and when does this happen? Are you sending flush-start/stop to wavparse while it's operating in push mode? Or before it's activated yet? Or..?
Hello Tim, Gstreamer pipeline for this issue looks like filesrc ! wavparse ! audioconvert ! alsasink. I am sending flush start/stop to whole pipeline. Warning appears when we send flush start/stop to the pipeline when it is in playing state. In this case, wavparse operates in pull mode where adapter is not used. Thanks, Rahul
Created attachment 344124 [details] Test program to reproduce issue Please find attached test program to reproduce issue.
Sure, we can fix that, but what purpose does it serve? How will you re-start streaming afterwards? Will you do a seek?
I usually use playbin. For stopping current playback, I flush pipeline and set pipeline state to NULL. To start new playback, I set uri property and pipeline state to PLAYING.
Ok, and why do you flush rather than just set pipeline state to NULL? Just shutting down the pipeline should accomplish the same thing and flush as well.
Flush before setting pipeline state to NULL comes from legacy code of gstreamer 0.10 time. While shutting down pipeline, it used to block sometimes. I will try removing flush. Do you think patch is still valid since it is checking for not null ?
Yeah, I think it's fine to push, I was just trying to figure out why you're doing what you're doing because it's a bit weird :) Thanks for the patch! commit f05c0c036e2ac7eec4ea06af20ec41b4bd265d75 Author: Rahul Bedarkar <rahul.bedarkar@imgtec.com> Date: Mon Jan 9 11:32:35 2017 +0530 wavparse: check for not NULL before clearing adapter In case wavparse receives a manually injected FLUSH_STOP event while operating in pull mode we get criticals because we'd try to clear a NULL adapter. https://bugzilla.gnome.org/show_bug.cgi?id=777123