Velkan
Velkan

Reputation: 7592

Appsrc is stuck in preroll even when sending EOS

Application has a pipeline:

appsrc is-live=true ! audiorate skip-to-first=true tolerance=250000000 ! opusenc ! oggmux ! filesink

The gst_element_send_event(appsrc, gst_event_new_eos()) is called to terminate it. But the EOS sometimes doesn't get to the bus of the pipeline.

When it's not getting through, the call stack of the loop that has to deliver the EOS is instead stuck in waiting for a preroll:

g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
gst_base_sink_wait_preroll () at gstbasesink.c:2212
gst_base_sink_do_preroll () at gstbasesink.c:2306
gst_base_sink_do_sync () at gstbasesink.c:2508
gst_base_sink_chain_unlocked () at gstbasesink.c:3495
gst_base_sink_chain_main () at gstbasesink.c:3656
gst_pad_chain_data_unchecked () at gstpad.c:4188
gst_pad_push_data () at gstpad.c:4440
in gst_pad_push () at gstpad.c:4559
in gst_proxy_pad_chain_default () at gstghostpad.c:126
in gst_pad_chain_data_unchecked () at gstpad.c:4188
gst_pad_push_data () at gstpad.c:4440
in gst_pad_push () at gstpad.c:4559
in gst_base_src_loop () at gstbasesrc.c:2850
in gst_task_func () at gsttask.c:332
in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
in start_thread () at pthread_create.c:333
in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

The application has no data to put into appsrc because it's part of the cleanup procedure.

GStreamer 1.8.3.

How to cancel that preroll and get a proper EOS on the bus so everything can be closed?

Upvotes: 0

Views: 910

Answers (0)

Related Questions