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
69b6b2d2
Commit
69b6b2d2
authored
May 12, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set channel_layout for S302M.
parent
0aac0403
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
s302m.c
libavcodec/s302m.c
+10
-0
No files found.
libavcodec/s302m.c
View file @
69b6b2d2
...
...
@@ -64,6 +64,16 @@ static int s302m_parse_frame_header(AVCodecContext *avctx, const uint8_t *buf,
avctx
->
sample_fmt
=
SAMPLE_FMT_S16
;
avctx
->
channels
=
channels
;
switch
(
channels
)
{
case
2
:
avctx
->
channel_layout
=
AV_CH_LAYOUT_STEREO
;
break
;
case
4
:
avctx
->
channel_layout
=
AV_CH_LAYOUT_QUAD
;
break
;
case
8
:
avctx
->
channel_layout
=
AV_CH_LAYOUT_5POINT1_BACK
|
AV_CH_LAYOUT_STEREO_DOWNMIX
;
}
avctx
->
sample_rate
=
48000
;
avctx
->
bit_rate
=
48000
*
avctx
->
channels
*
(
avctx
->
bits_per_coded_sample
+
4
)
+
32
*
(
48000
/
(
buf_size
*
8
/
...
...
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