From ca6600c772b176b903f468cf9d9c597b86c9f162 Mon Sep 17 00:00:00 2001 From: chenning Date: Mon, 1 Sep 2025 15:25:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9E=90=E6=9E=84?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenning --- services/media_engine/filters/video_capture_filter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/services/media_engine/filters/video_capture_filter.cpp b/services/media_engine/filters/video_capture_filter.cpp index 3b6c1b378..9c294f96d 100644 --- a/services/media_engine/filters/video_capture_filter.cpp +++ b/services/media_engine/filters/video_capture_filter.cpp @@ -103,6 +103,7 @@ VideoCaptureFilter::VideoCaptureFilter(std::string name, FilterType type): Filte VideoCaptureFilter::~VideoCaptureFilter() { MEDIA_LOG_I("video capture filter destroy"); + inputSurface_->UnregisterConsumerListener(); } Status VideoCaptureFilter::SetCodecFormat(const std::shared_ptr &format) -- Gitee From 402e93fe105db59b98c27f08690df6905d0ea7c6 Mon Sep 17 00:00:00 2001 From: chenning Date: Mon, 1 Sep 2025 13:02:19 +0000 Subject: [PATCH 2/2] update services/media_engine/filters/video_capture_filter.cpp. Signed-off-by: chenning --- services/media_engine/filters/video_capture_filter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/media_engine/filters/video_capture_filter.cpp b/services/media_engine/filters/video_capture_filter.cpp index 9c294f96d..460b85547 100644 --- a/services/media_engine/filters/video_capture_filter.cpp +++ b/services/media_engine/filters/video_capture_filter.cpp @@ -103,7 +103,9 @@ VideoCaptureFilter::VideoCaptureFilter(std::string name, FilterType type): Filte VideoCaptureFilter::~VideoCaptureFilter() { MEDIA_LOG_I("video capture filter destroy"); - inputSurface_->UnregisterConsumerListener(); + if (inputSurface_ != nullptr) { + inputSurface_->UnregisterConsumerListener(); + } } Status VideoCaptureFilter::SetCodecFormat(const std::shared_ptr &format) -- Gitee