BugFix Gst Pipeline closing and unreferencing

Need to empty pipeline bus if IGNORE_GST_BUS_MESSAGE is not set. Ensuring all gst_objects are unreferenced properly to be erased.
This commit is contained in:
Bruno Herbelin
2024-10-03 14:56:58 +02:00
parent d0b8cf0275
commit 32c83a6eee
8 changed files with 141 additions and 65 deletions

View File

@@ -322,6 +322,7 @@ private:
LoopMode loop_;
GstState desired_state_;
GstElement *pipeline_;
GstBus *bus_;
GstVideoInfo v_frame_video_info_;
std::atomic<bool> opened_;
std::atomic<bool> failed_;
@@ -409,7 +410,7 @@ private:
static void callback_element_setup (GstElement *pipeline, GstElement *element, MediaPlayer *mp);
// global list of registered media player
static void pipeline_terminate(GstElement *p);
static void pipeline_terminate(GstElement *p, GstBus *b);
static std::list<GstElement*> registered_;
};