webrtc_source: Improve _set_manual_payload_type() 09/316509/1 accepted/tizen/unified/20240902.161330 accepted/tizen/unified/dev/20240903.220435 accepted/tizen/unified/x/20240903.023218
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 22 Aug 2024 09:14:27 +0000 (18:14 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 22 Aug 2024 09:14:40 +0000 (18:14 +0900)
A condition has been added not to allow 0 value.
Valid range has been added to the documentation.

[Version] 1.1.29
[Issue Type] Bug fix

Change-Id: Ieb33ed50d8175c67770668c1a7e95a798845bddd
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
include/webrtc.h
packaging/capi-media-webrtc.spec
src/webrtc_source.c

index ee05d38aa08ae7640e348d99f58852668799e3cf..d676a569cf6990bdd80491e2107189fcedc70d61 100644 (file)
@@ -1234,7 +1234,8 @@ int webrtc_media_source_get_transceiver_codec(webrtc_h webrtc, unsigned int sour
  * @param[in] webrtc      WebRTC handle
  * @param[in] source_id   The media source id
  * @param[in] codec       The transceiver codec
- * @param[in] pt          The RTP payload type
+ * @param[in] pt          The RTP payload type\n
+ *                        Valid range is 96 ~ 127.
  * @return @c 0 on success,
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE    Successful
index 03dba2e4f10da7326088a9ed722b104b27925d67..2c72b3559650510f72903119a3c960ab666efbc3 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    1.1.28
+Version:    1.1.29
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index b7364f3300c56da01bb12f9ca1d4833b1adfefba..7cdf24ff21c7817144fcd1238c8373ce4536921e 100644 (file)
@@ -966,7 +966,7 @@ int _set_manual_payload_type(webrtc_s *webrtc, unsigned int source_id, webrtc_tr
                LOG_INFO("already payload type[%u] was set", source->av[av_idx].multiple_codecs[mc_idx].pt);
                return WEBRTC_ERROR_NONE;
 
-       } else if (pt == source->av[av_idx].pt) {
+       } else if (source->av[av_idx].pt != 0 && pt == source->av[av_idx].pt) {
                if (!source->av[av_idx].pt_set_by_api)
                        _return_payload_type(webrtc, source->av[av_idx].pt);
                source->av[av_idx].pt_set_by_api = true;