From a304653aa355dc813075af4acab1afeba99dc0fb Mon Sep 17 00:00:00 2001 From: rekhap2kandhavelan Date: Wed, 1 Jul 2026 15:28:03 +0530 Subject: [PATCH 1/4] Update MediaPipelineServerInternal.cpp --- media/server/main/source/MediaPipelineServerInternal.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/media/server/main/source/MediaPipelineServerInternal.cpp b/media/server/main/source/MediaPipelineServerInternal.cpp index ca4e72ebf..c0cd19854 100644 --- a/media/server/main/source/MediaPipelineServerInternal.cpp +++ b/media/server/main/source/MediaPipelineServerInternal.cpp @@ -1593,10 +1593,14 @@ void MediaPipelineServerInternal::notifySourceFlushed(MediaSourceType mediaSourc void MediaPipelineServerInternal::notifyPlaybackInfo(const PlaybackInfo &playbackInfo) { - if (m_mediaPipelineClient) + if (m_gstPlayer && m_mediaPipelineClient) { m_mediaPipelineClient->notifyPlaybackInfo(playbackInfo); } + else + { + RIALTO_SERVER_LOG_WARN("notifyPlaybackInfo skipped due to invalid gstPlayer"); + } } void MediaPipelineServerInternal::scheduleNotifyNeedMediaData(MediaSourceType mediaSourceType) From 1036195680c1963f1815c534fc9d7b8914f9b995 Mon Sep 17 00:00:00 2001 From: rekhap2kandhavelan Date: Wed, 1 Jul 2026 15:34:07 +0530 Subject: [PATCH 2/4] Update MediaPipelineServerInternal.cpp --- media/server/main/source/MediaPipelineServerInternal.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/media/server/main/source/MediaPipelineServerInternal.cpp b/media/server/main/source/MediaPipelineServerInternal.cpp index c0cd19854..397edb4e6 100644 --- a/media/server/main/source/MediaPipelineServerInternal.cpp +++ b/media/server/main/source/MediaPipelineServerInternal.cpp @@ -188,6 +188,12 @@ MediaPipelineServerInternal::~MediaPipelineServerInternal() m_shmBuffer.reset(); m_mainThread->unregisterClient(m_mainThreadClientId); + + // Destroy GstPlayer first, while the main thread client is still registered. + // This ensures that during the worker thread drain in ~GstGenericPlayer, + // any callbacks (notifyNeedMediaData, notifyPlaybackState, etc.) that + // enqueue tasks on the main thread can still be accepted and won't crash. + m_gstPlayer.reset(); }; m_mainThread->enqueueTaskAndWait(m_mainThreadClientId, task); } From b7cfc09bb9891af099c4bcbecb8f07a8de489f29 Mon Sep 17 00:00:00 2001 From: rekhap2kandhavelan Date: Thu, 2 Jul 2026 14:35:31 +0530 Subject: [PATCH 3/4] Update MediaPipelineServerInternal.cpp --- media/server/main/source/MediaPipelineServerInternal.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/media/server/main/source/MediaPipelineServerInternal.cpp b/media/server/main/source/MediaPipelineServerInternal.cpp index 397edb4e6..c49aac7a2 100644 --- a/media/server/main/source/MediaPipelineServerInternal.cpp +++ b/media/server/main/source/MediaPipelineServerInternal.cpp @@ -188,11 +188,6 @@ MediaPipelineServerInternal::~MediaPipelineServerInternal() m_shmBuffer.reset(); m_mainThread->unregisterClient(m_mainThreadClientId); - - // Destroy GstPlayer first, while the main thread client is still registered. - // This ensures that during the worker thread drain in ~GstGenericPlayer, - // any callbacks (notifyNeedMediaData, notifyPlaybackState, etc.) that - // enqueue tasks on the main thread can still be accepted and won't crash. m_gstPlayer.reset(); }; m_mainThread->enqueueTaskAndWait(m_mainThreadClientId, task); From e0fdc31c615a109322ad9cb517131f5a9401bb7f Mon Sep 17 00:00:00 2001 From: rekhap2kandhavelan Date: Fri, 3 Jul 2026 14:00:17 +0530 Subject: [PATCH 4/4] Update MediaPipelineServerInternal.cpp --- media/server/main/source/MediaPipelineServerInternal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/server/main/source/MediaPipelineServerInternal.cpp b/media/server/main/source/MediaPipelineServerInternal.cpp index c49aac7a2..3092e9687 100644 --- a/media/server/main/source/MediaPipelineServerInternal.cpp +++ b/media/server/main/source/MediaPipelineServerInternal.cpp @@ -188,9 +188,9 @@ MediaPipelineServerInternal::~MediaPipelineServerInternal() m_shmBuffer.reset(); m_mainThread->unregisterClient(m_mainThreadClientId); - m_gstPlayer.reset(); }; m_mainThread->enqueueTaskAndWait(m_mainThreadClientId, task); + m_gstPlayer.reset(); } bool MediaPipelineServerInternal::load(MediaType type, const std::string &mimeType, const std::string &url)