[Bug 736655] basesink: preroll issue for some clips which audio is shorter than video

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu May 18 17:11:43 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=736655

GstBlub <gstblub at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gstblub at gmail.com

--- Comment #157 from GstBlub <gstblub at gmail.com> ---
I have a similar problem, if not the same (1.12.0).  It seems like the problem
is a race condition when acting on the buffering messages emitted by queue2 and
prerolling, in my case an appsink.

In my case it sometimes, but not always, gets stuck.  It happens when I get a
buffering message from queue2 that the buffer dropped to 0%, and I take the
pipeline to PAUSED state.  However, it seems that the streamsynchronizer's
queue is blocked (in gst_base_sink_wait_preroll of the appsink) pushing out a
buffer, and at the same time it can't accept any new buffer because it's deemed
full.  But because it can't accept any more buffers, the queue2 is blocked as
well, and so it never gets a change to send another buffering message, which
then would trigger a state change back to PLAYING, which would unblock the
preroll wait.

Thread 3 (Thread 0xb1cffb40 (LWP 24912)):
#0  0xb75f9ae1 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb6e11a41 in g_cond_wait () from /usr/lib/libglib-2.0.so.0
#2  0xb472283c in gst_queue_chain_buffer_or_list (pad=0xb2f2ecd0,
parent=0xb253a0b0, obj=0xb4098218, is_list=0) at gstqueue.c:1228
#3  0xb4722ffb in gst_queue_chain (pad=0xb2f2ecd0, parent=0xb253a0b0,
buffer=0xb4098218) at gstqueue.c:1326
#4  0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2f2ecd0, type=4112,
data=0xb4098218) at gstpad.c:4205
#5  0xb69fb5b1 in gst_pad_push_data (pad=0xb2507420, type=4112,
data=0xb4098218) at gstpad.c:4457
#6  0xb69fbc6e in gst_pad_push (pad=0xb2507420, buffer=0xb4098218) at
gstpad.c:4576
#7  0xb69dd3d3 in gst_proxy_pad_chain_default (pad=0xb2f31490,
parent=0x8360660, buffer=0xb4098218) at gstghostpad.c:127
#8  0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2f31490, type=4112,
data=0xb4098218) at gstpad.c:4205
#9  0xb69fb5b1 in gst_pad_push_data (pad=0xb2536240, type=4112,
data=0xb4098218) at gstpad.c:4457
#10 0xb69fbc6e in gst_pad_push (pad=0xb2536240, buffer=0xb4098218) at
gstpad.c:4576
#11 0xb44c2bd5 in gst_stream_synchronizer_sink_chain (pad=0xb2536100,
parent=0x8322390, buffer=0xb4098218) at gststreamsynchronizer.c:711
#12 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2536100, type=4112,
data=0xb4098218) at gstpad.c:4205
#13 0xb69fb5b1 in gst_pad_push_data (pad=0xb2507568, type=4112,
data=0xb4098218) at gstpad.c:4457
#14 0xb69fbc6e in gst_pad_push (pad=0xb2507568, buffer=0xb4098218) at
gstpad.c:4576
#15 0xb4739061 in gst_tee_handle_data (tee=0xb2f0f440, data=0xb4098218,
is_list=0) at gsttee.c:657
#16 0xb47395d0 in gst_tee_chain (pad=0xb2f2eb90, parent=0xb2f0f440,
buffer=0xb4098218) at gsttee.c:780
#17 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2f2eb90, type=4112,
data=0xb4098218) at gstpad.c:4205
#18 0xb69fb5b1 in gst_pad_push_data (pad=0xb25072d0, type=4112,
data=0xb4098218) at gstpad.c:4457
#19 0xb69fbc6e in gst_pad_push (pad=0xb25072d0, buffer=0xb4098218) at
gstpad.c:4576
#20 0xb69dd3d3 in gst_proxy_pad_chain_default (pad=0xb2f31338,
parent=0x8374078, buffer=0xb4098218) at gstghostpad.c:127
#21 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2f31338, type=4112,
data=0xb4098218) at gstpad.c:4205
#22 0xb69fb5b1 in gst_pad_push_data (pad=0xb2f2ea50, type=4112,
data=0xb4098218) at gstpad.c:4457
#23 0xb69fbc6e in gst_pad_push (pad=0xb2f2ea50, buffer=0xb4098218) at
gstpad.c:4576
#24 0xb470d199 in gst_selector_pad_chain (pad=0xb2534118, parent=0xb2533048,
buf=0xb4098218) at gstinputselector.c:1131
#25 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2534118, type=4112,
data=0xb4098218) at gstpad.c:4205
#26 0xb69fb5b1 in gst_pad_push_data (pad=0xb2f311e0, type=4112,
data=0xb4098218) at gstpad.c:4457
#27 0xb69fbc6e in gst_pad_push (pad=0xb2f311e0, buffer=0xb4098218) at
gstpad.c:4576
#28 0xb69dd3d3 in gst_proxy_pad_chain_default (pad=0xb2507180,
parent=0xb2f311e0, buffer=0xb4098218) at gstghostpad.c:127
#29 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2507180, type=4112,
data=0xb4098218) at gstpad.c:4205
#30 0xb69fb5b1 in gst_pad_push_data (pad=0xb2506030, type=4112,
data=0xb4098218) at gstpad.c:4457
#31 0xb69fbc6e in gst_pad_push (pad=0xb2506030, buffer=0xb4098218) at
gstpad.c:4576
#32 0xb69dd3d3 in gst_proxy_pad_chain_default (pad=0xb2507030,
parent=0xb2506030, buffer=0xb4098218) at gstghostpad.c:127
#33 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2507030, type=4112,
data=0xb4098218) at gstpad.c:4205
#34 0xb69fb5b1 in gst_pad_push_data (pad=0xb2f2e910, type=4112,
data=0xb4098218) at gstpad.c:4457
#35 0xb69fbc6e in gst_pad_push (pad=0xb2f2e910, buffer=0xb4098218) at
gstpad.c:4576
#36 0xb6c85b6b in gst_audio_decoder_push_forward (dec=0xb251a810,
buf=0xb4098218) at gstaudiodecoder.c:958
#37 0xb6c86345 in gst_audio_decoder_output (dec=0xb251a810, buf=0xb4098218) at
gstaudiodecoder.c:1034
#38 0xb6c87d0d in gst_audio_decoder_finish_frame (dec=0xb251a810,
buf=0xb4098218, frames=0) at gstaudiodecoder.c:1378
#39 0xb530758c in gst_mpg123_audio_dec_push_decoded_bytes
(mpg123_decoder=0xb251a810, 
    decoded_bytes=0xb25304d0
"rO\034]\"Vr[\r]\327ZOaY\\\245al\\9a1Y\262b\331T\354f-R\226k\311Oxm\fM\322mAM~n\026P4o\243R\200p:S\222r\304O\356s\203J\223s\276G\246q\363E\350n\364C\340l\vD\372k\252DCj\365B\205g9@\336e",
num_decoded_bytes=4608) at gstmpg123audiodec.c:314
#40 0xb530785b in gst_mpg123_audio_dec_handle_frame (dec=0xb251a810,
input_buffer=0xb253e560) at gstmpg123audiodec.c:388
#41 0xb6c8824a in gst_audio_decoder_handle_frame (dec=0xb251a810,
klass=0xb2519d18, buffer=0xb253e560) at gstaudiodecoder.c:1440
#42 0xb6c887dd in gst_audio_decoder_push_buffers (dec=0xb251a810, force=0) at
gstaudiodecoder.c:1538
#43 0xb6c88dda in gst_audio_decoder_chain_forward (dec=0xb251a810, buffer=0x0)
at gstaudiodecoder.c:1652
#44 0xb6c8a4ed in gst_audio_decoder_chain (pad=0xb2f2e7d0, parent=0xb251a810,
buffer=0xb253e560) at gstaudiodecoder.c:1912
#45 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2f2e7d0, type=4112,
data=0xb253e560) at gstpad.c:4205
#46 0xb69fb5b1 in gst_pad_push_data (pad=0xb2f2e690, type=4112,
data=0xb253e560) at gstpad.c:4457
#47 0xb69fbc6e in gst_pad_push (pad=0xb2f2e690, buffer=0xb253e560) at
gstpad.c:4576
#48 0xb6bf9ed2 in gst_base_parse_push_frame (parse=0xb2514480,
frame=0xb2f02120) at gstbaseparse.c:2520
#49 0xb6bf8d3b in gst_base_parse_handle_and_push_frame (parse=0xb2514480,
frame=0xb2f02120) at gstbaseparse.c:2337
#50 0xb6bfa765 in gst_base_parse_finish_frame (parse=0xb2514480,
frame=0xb2f02120, size=418) at gstbaseparse.c:2678
#51 0xb30714df in gst_mpeg_audio_parse_handle_frame (parse=0xb2514480,
frame=0xb2f02120, skipsize=0xb1cfebfc) at gstmpegaudioparse.c:771
#52 0xb6bf7ec0 in gst_base_parse_handle_buffer (parse=0xb2514480,
buffer=0xb40cad00, skip=0xb1cfebfc, flushed=0xb1cfebf8) at gstbaseparse.c:2145
#53 0xb6bfd193 in gst_base_parse_chain (pad=0xb2f2e550, parent=0xb2514480,
buffer=0xb2573148) at gstbaseparse.c:3227
#54 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0xb2f2e550, type=4112,
data=0xb2573148) at gstpad.c:4205
#55 0xb69fb5b1 in gst_pad_push_data (pad=0xb2f2e050, type=4112,
data=0xb2573148) at gstpad.c:4457
#56 0xb69fbc6e in gst_pad_push (pad=0xb2f2e050, buffer=0xb2573148) at
gstpad.c:4576
#57 0xb473c284 in gst_type_find_element_chain (pad=0x835ee60, parent=0x8327540,
buffer=0xb2573148) at gsttypefindelement.c:900
#58 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0x835ee60, type=4112,
data=0xb2573148) at gstpad.c:4205
#59 0xb69fb5b1 in gst_pad_push_data (pad=0x831fab8, type=4112, data=0xb2573148)
at gstpad.c:4457
#60 0xb69fbc6e in gst_pad_push (pad=0x831fab8, buffer=0xb2573148) at
gstpad.c:4576
#61 0xb69dd3d3 in gst_proxy_pad_chain_default (pad=0x8366bb0, parent=0x8347758,
buffer=0xb2573148) at gstghostpad.c:127
#62 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0x8366bb0, type=4112,
data=0xb2573148) at gstpad.c:4205
#63 0xb69fb5b1 in gst_pad_push_data (pad=0xb2f2e2d0, type=4112,
data=0xb2573148) at gstpad.c:4457
#64 0xb69fbc6e in gst_pad_push (pad=0xb2f2e2d0, buffer=0xb2573148) at
gstpad.c:4576
#65 0xb4732885 in gst_queue2_push_one (queue=0xb2f360a0) at gstqueue2.c:2915
#66 0xb473348f in gst_queue2_loop (pad=0xb2f2e2d0) at gstqueue2.c:3039
#67 0xb6a35a91 in gst_task_func (task=0xb4005e90) at gsttask.c:335
#68 0xb75f5dfc in start_thread () from /lib/libpthread.so.0
#69 0xb64581ee in clone () from /lib/libc.so.6

Thread 2 (Thread 0xb1affb40 (LWP 24913)):
#0  0xb75f9ae1 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb6e11a41 in g_cond_wait () from /usr/lib/libglib-2.0.so.0
#2  0xb6c0c816 in gst_base_sink_wait_preroll (sink=0x8324778) at
gstbasesink.c:2268
#3  0xb6c0cdde in gst_base_sink_do_preroll (sink=0x8324778, obj=0xb40ec2c8) at
gstbasesink.c:2364
#4  0xb6c0d7b4 in gst_base_sink_do_sync (basesink=0x8324778, obj=0xb40ec2c8,
late=0xb1afed34, step_end=0xb1afed30) at gstbasesink.c:2566
#5  0xb6c123da in gst_base_sink_chain_unlocked (basesink=0x8324778,
pad=0x8325090, obj=0xb40ec2c8, is_list=0) at gstbasesink.c:3522
#6  0xb6c13357 in gst_base_sink_chain_main (basesink=0x8324778, pad=0x8325090,
obj=0xb40ec2c8, is_list=0) at gstbasesink.c:3678
#7  0xb6c1347e in gst_base_sink_chain (pad=0x8325090, parent=0x8324778,
buf=0xb40ec2c8) at gstbasesink.c:3707
#8  0xb69faa87 in gst_pad_chain_data_unchecked (pad=0x8325090, type=4112,
data=0xb40ec2c8) at gstpad.c:4205
#9  0xb69fb5b1 in gst_pad_push_data (pad=0x831f968, type=4112, data=0xb40ec2c8)
at gstpad.c:4457
#10 0xb69fbc6e in gst_pad_push (pad=0x831f968, buffer=0xb40ec2c8) at
gstpad.c:4576
#11 0xb69dd3d3 in gst_proxy_pad_chain_default (pad=0x8366900, parent=0x8360138,
buffer=0xb40ec2c8) at gstghostpad.c:127
#12 0xb69faa87 in gst_pad_chain_data_unchecked (pad=0x8366900, type=4112,
data=0xb40ec2c8) at gstpad.c:4205
#13 0xb69fb5b1 in gst_pad_push_data (pad=0xb2f2ee10, type=4112,
data=0xb40ec2c8) at gstpad.c:4457
#14 0xb69fbc6e in gst_pad_push (pad=0xb2f2ee10, buffer=0xb40ec2c8) at
gstpad.c:4576
#15 0xb4723160 in gst_queue_push_one (queue=0xb253a0b0) at gstqueue.c:1365
#16 0xb472405b in gst_queue_loop (pad=0xb2f2ee10) at gstqueue.c:1517
#17 0xb6a35a91 in gst_task_func (task=0xb25190f0) at gsttask.c:335
#18 0xb75f5dfc in start_thread () from /lib/libpthread.so.0
#19 0xb64581ee in clone () from /lib/libc.so.6

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list