Fix: Detaching bus callback in ~GstEnginePipeline
This commit is contained in:
parent
86b958015b
commit
5705d4fd85
|
@ -499,7 +499,7 @@ bool GstEnginePipeline::InitAudioBin() {
|
|||
gst_object_unref(pad);
|
||||
GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline_));
|
||||
gst_bus_set_sync_handler(bus, BusCallbackSync, this, nullptr);
|
||||
bus_cb_id_ = gst_bus_add_watch(bus, BusCallback, this);
|
||||
gst_bus_add_watch(bus, BusCallback, this);
|
||||
gst_object_unref(bus);
|
||||
|
||||
return true;
|
||||
|
@ -567,10 +567,11 @@ bool GstEnginePipeline::InitFromReq(const MediaPlaybackRequest& req,
|
|||
GstEnginePipeline::~GstEnginePipeline() {
|
||||
if (pipeline_) {
|
||||
GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline_));
|
||||
gst_bus_remove_watch(bus);
|
||||
|
||||
gst_bus_set_sync_handler(bus, nullptr, nullptr, nullptr);
|
||||
gst_object_unref(bus);
|
||||
|
||||
g_source_remove(bus_cb_id_);
|
||||
gst_element_set_state(pipeline_, GST_STATE_NULL);
|
||||
|
||||
if (tee_) {
|
||||
|
|
|
@ -294,8 +294,6 @@ class GstEnginePipeline : public GstPipelineBase {
|
|||
GstPad* tee_probe_pad_;
|
||||
GstPad* tee_audio_pad_;
|
||||
|
||||
uint bus_cb_id_;
|
||||
|
||||
QThreadPool set_state_threadpool_;
|
||||
|
||||
GstSegment last_decodebin_segment_;
|
||||
|
|
Loading…
Reference in New Issue