From 862b38c5ea81c30935f0ca17360509f3f36b5e09 Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Thu, 22 Aug 2024 18:14:27 +0900 Subject: [PATCH] webrtc_source: Improve _set_manual_payload_type() 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 --- include/webrtc.h | 3 ++- packaging/capi-media-webrtc.spec | 2 +- src/webrtc_source.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/webrtc.h b/include/webrtc.h index ee05d38a..d676a569 100644 --- a/include/webrtc.h +++ b/include/webrtc.h @@ -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 diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 03dba2e4..2c72b355 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: 1.1.28 +Version: 1.1.29 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_source.c b/src/webrtc_source.c index b7364f33..7cdf24ff 100644 --- a/src/webrtc_source.c +++ b/src/webrtc_source.c @@ -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; -- 2.34.1