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
73e2007f
Commit
73e2007f
authored
Apr 07, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
idroqdec: set channel layout
parent
f6c3adde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
idroqdec.c
libavformat/idroqdec.c
+9
-1
No files found.
libavformat/idroqdec.c
View file @
73e2007f
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
* http://www.csse.monash.edu.au/~timf/
* http://www.csse.monash.edu.au/~timf/
*/
*/
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "avformat.h"
#include "internal.h"
#include "internal.h"
...
@@ -175,7 +176,14 @@ static int roq_read_packet(AVFormatContext *s,
...
@@ -175,7 +176,14 @@ static int roq_read_packet(AVFormatContext *s,
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codec
->
codec_id
=
AV_CODEC_ID_ROQ_DPCM
;
st
->
codec
->
codec_id
=
AV_CODEC_ID_ROQ_DPCM
;
st
->
codec
->
codec_tag
=
0
;
/* no tag */
st
->
codec
->
codec_tag
=
0
;
/* no tag */
st
->
codec
->
channels
=
roq
->
audio_channels
=
chunk_type
==
RoQ_SOUND_STEREO
?
2
:
1
;
if
(
chunk_type
==
RoQ_SOUND_STEREO
)
{
st
->
codec
->
channels
=
2
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_STEREO
;
}
else
{
st
->
codec
->
channels
=
1
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_MONO
;
}
roq
->
audio_channels
=
st
->
codec
->
channels
;
st
->
codec
->
sample_rate
=
RoQ_AUDIO_SAMPLE_RATE
;
st
->
codec
->
sample_rate
=
RoQ_AUDIO_SAMPLE_RATE
;
st
->
codec
->
bits_per_coded_sample
=
16
;
st
->
codec
->
bits_per_coded_sample
=
16
;
st
->
codec
->
bit_rate
=
st
->
codec
->
channels
*
st
->
codec
->
sample_rate
*
st
->
codec
->
bit_rate
=
st
->
codec
->
channels
*
st
->
codec
->
sample_rate
*
...
...
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