From 48e81e3928d2b17336fb3153f02ccb2b759ff868 Mon Sep 17 00:00:00 2001 From: hj kim Date: Fri, 19 Aug 2022 10:47:51 +0900 Subject: [PATCH] webrtc_source: Don't allow resolution change of encoded video format This new condition is checked only when the state is not IDLE. [Version] 0.3.205 [Issue Type] Improvement(check condition) Change-Id: I25bd78a4f20615c36735c9c44b3880a1b762e895 --- packaging/capi-media-webrtc.spec | 2 +- src/webrtc_source.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 900d3211..eea71f04 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 0.3.204 +Version: 0.3.205 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_source.c b/src/webrtc_source.c index 151edf62..20573baa 100644 --- a/src/webrtc_source.c +++ b/src/webrtc_source.c @@ -1378,6 +1378,10 @@ int _set_video_resolution(webrtc_s *webrtc, unsigned int source_id, int width, i source->video_info.origin_width = width; source->video_info.origin_height = height; } else { + if (_is_encoded_format_supported(source->type, &webrtc->ini)) { + LOG_ERROR("this API does not support source with encoded format"); + return WEBRTC_ERROR_INVALID_OPERATION; + } RET_VAL_IF(width > source->video_info.origin_width, WEBRTC_ERROR_INVALID_OPERATION, "it doesn't support upscale. invalid width. origin [%d] requested [%d]", source->video_info.origin_width, width); -- 2.34.1