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
c9759eb4
Commit
c9759eb4
authored
Apr 07, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
omadec: set channel layout
parent
d4088efb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
omadec.c
libavformat/omadec.c
+3
-0
No files found.
libavformat/omadec.c
View file @
c9759eb4
...
...
@@ -40,6 +40,7 @@
* CODEC SUPPORT: Only ATRAC3 codec is currently supported!
*/
#include "libavutil/channel_layout.h"
#include "avformat.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
...
...
@@ -312,6 +313,7 @@ static int oma_read_header(AVFormatContext *s)
framesize
=
(
codec_params
&
0x3FF
)
*
8
;
jsflag
=
(
codec_params
>>
17
)
&
1
;
/* get stereo coding mode, 1 for joint-stereo */
st
->
codec
->
channels
=
2
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_STEREO
;
st
->
codec
->
sample_rate
=
samplerate
;
st
->
codec
->
bit_rate
=
st
->
codec
->
sample_rate
*
framesize
*
8
/
1024
;
...
...
@@ -346,6 +348,7 @@ static int oma_read_header(AVFormatContext *s)
case
OMA_CODECID_LPCM
:
/* PCM 44.1 kHz 16 bit stereo big-endian */
st
->
codec
->
channels
=
2
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_STEREO
;
st
->
codec
->
sample_rate
=
44100
;
framesize
=
1024
;
/* bit rate = sample rate x PCM block align (= 4) x 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