Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
a05f5052
Commit
a05f5052
authored
Sep 25, 2014
by
Timothy B. Terriberry
Committed by
Martin Storsjö
Sep 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdp: Make opus declaration conform to the spec
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
55174668
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
sdp.c
libavformat/sdp.c
+11
-1
No files found.
libavformat/sdp.c
View file @
a05f5052
...
...
@@ -583,8 +583,18 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type
,
c
->
sample_rate
);
break
;
case
AV_CODEC_ID_OPUS
:
av_strlcatf
(
buff
,
size
,
"a=rtpmap:%d opus/48000
\r\n
"
,
/* The opus RTP draft says that all opus streams MUST be declared
as stereo, to avoid negotiation failures. The actual number of
channels can change on a packet-by-packet basis. The number of
channels a receiver prefers to receive or a sender plans to send
can be declared via fmtp parameters (both default to mono), but
receivers MUST be able to receive and process stereo packets. */
av_strlcatf
(
buff
,
size
,
"a=rtpmap:%d opus/48000/2
\r\n
"
,
payload_type
);
if
(
c
->
channels
==
2
)
{
av_strlcatf
(
buff
,
size
,
"a=fmtp:%d sprop-stereo:1
\r\n
"
,
payload_type
);
}
break
;
default:
/* Nothing special to do here... */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment