GNOME Bugzilla – Bug 784846
audioaggregator: Deadlock for specific files playback since 20bf97f08912f0edb72bfdcdde4e5c40acb29823
Last modified: 2017-10-23 10:11:00 UTC
Using this file: https://ahiru.eu/~vivia/v.mov and this pipeline: gst-launch-1.0 -v filesrc location='./v.mov' ! decodebin name=d ! video/x-raw ! fakesink d. ! audio/x-raw ! tee ! queue ! audiomixer ! fakesink the pipeline doesn't preroll. Removing the video path of the pipeline, or the audiomixer, makes it work. I found it to work in 1.12.1 and a git bisect showed me this commit as the first bad one: commit 20bf97f08912f0edb72bfdcdde4e5c40acb29823 Author: Olivier Crête <olivier.crete@collabora.com> Date: Sun May 21 14:34:13 2017 +0200 aggregator: Check for the result of caps events https://bugzilla.gnome.org/show_bug.cgi?id=782918 A backtrace shows that it's a deadlock:
+ Trace 237642
Thread 11 (Thread 0x7fffd80b9700 (LWP 12277))
Thread 6 (Thread 0x7ffff0b46700 (LWP 12205))
Thread 5 (Thread 0x7ffff1347700 (LWP 12204))
Thread 3 (Thread 0x7ffff3a7f700 (LWP 12185))
Thread 2 (Thread 0x7ffff4280700 (LWP 12184))
Probably something pre-existing though, because the offending commit isn't really forgetting to unlock anything...?
First you need the patches from #784911 then this one
Created attachment 355560 [details] [review] audioaggregator: Accept buffer with no data, but duration and gap flag These are produced from GAP events by the base class.
We need to write a unit test for the GAP flag handling.
GAP event handling I mean, but buffers with GAP flag too..
This patch also works. Thanks! :)
Review of attachment 355560 [details] [review]: Looks good, my comments are just nitpick, no worries if you don't have time. ::: gst-libs/gst/audio/gstaudioaggregator.c @@ +789,3 @@ + !GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP)) { + GST_WARNING_OBJECT (pad, "Dropping 0-sized buffer missing either a" + " duration or a GAP flag: %" GST_PTR_FORMAT, inbuf); Nitpick, but something simpler like "Dropping non-GAP empty buffers" seems better to me. @@ +794,3 @@ + + pad->priv->size = gst_util_uint64_scale (GST_BUFFER_DURATION (inbuf), rate, + GST_SECOND); How hard would it be to rename size in something like "num_frames" or similar ?
Merged: commit fd81f27bd8e5e5b3e37ad4811597748eaedb7bc2 (HEAD -> master, upstream/master, origin/master) Author: Olivier Crête <olivier.crete@collabora.com> Date: Thu Jul 13 19:09:43 2017 -0400 audioaggregator: Accept buffer with no data, but duration and gap flag These are produced from GAP events by the base class. https://bugzilla.gnome.org/show_bug.cgi?id=784846