Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
a05f5052
Commit
a05f5052
authored
10 years ago
by
Timothy B. Terriberry
Committed by
Martin Storsjö
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sdp: Make opus declaration conform to the spec
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
55174668
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/sdp.c
+11
-1
11 additions, 1 deletion
libavformat/sdp.c
with
11 additions
and
1 deletion
libavformat/sdp.c
+
11
−
1
View file @
a05f5052
...
@@ -583,8 +583,18 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
...
@@ -583,8 +583,18 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type
,
c
->
sample_rate
);
payload_type
,
c
->
sample_rate
);
break
;
break
;
case
AV_CODEC_ID_OPUS
:
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
);
payload_type
);
if
(
c
->
channels
==
2
)
{
av_strlcatf
(
buff
,
size
,
"a=fmtp:%d sprop-stereo:1
\r\n
"
,
payload_type
);
}
break
;
break
;
default:
default:
/* Nothing special to do here... */
/* Nothing special to do here... */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment