webrtc_source: Don't allow resolution change of encoded video format 89/279889/9
authorhj kim <backto.kim@samsung.com>
Fri, 19 Aug 2022 01:47:51 +0000 (10:47 +0900)
committerhj kim <backto.kim@samsung.com>
Tue, 23 Aug 2022 04:59:34 +0000 (13:59 +0900)
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
src/webrtc_source.c

index 900d3211562cc1ab2acbf7f7a532be7a1a11102e..eea71f0429d52e418a507f34764b7b15a348acac 100644 (file)
@@ -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
index 151edf62fa6ba0dce3b8c6e75ffea10967f7c1a8..20573baab1577adf16e9524db3c62db08277aaf5 100644 (file)
@@ -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);