[FFmpeg-devel] [PATCH v4 1/2] libavformat/sdp.c: add LE16 format(pcm The least significant byte)

xweimvp at gmail.com xweimvp at gmail.com
Wed Jan 20 10:34:13 EET 2021


From: weishao <xweimvp at gmail.com>

Signed-off-by: weishao <xweimvp at gmail.com>
---
 libavformat/sdp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 95f3fbb876..484d30af1b 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -585,6 +585,12 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int
                                          payload_type,
                                          p->sample_rate, p->channels);
             break;
+        case AV_CODEC_ID_PCM_S16LE:
+            if (payload_type >= RTP_PT_PRIVATE)
+                av_strlcatf(buff, size, "a=rtpmap:%d LE16/%d/%d\r\n",
+                                         payload_type,
+                                         p->sample_rate, p->channels);
+            break;
         case AV_CODEC_ID_PCM_S24BE:
             if (payload_type >= RTP_PT_PRIVATE)
                 av_strlcatf(buff, size, "a=rtpmap:%d L24/%d/%d\r\n",
-- 
2.17.1



More information about the ffmpeg-devel mailing list