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
024e0370
Commit
024e0370
authored
Apr 07, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iff: set channel layout
parent
73e2007f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
iff.c
libavformat/iff.c
+9
-1
No files found.
libavformat/iff.c
View file @
024e0370
...
...
@@ -29,6 +29,7 @@
* http://wiki.multimedia.cx/index.php?title=IFF
*/
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
...
...
@@ -120,6 +121,7 @@ static int iff_read_header(AVFormatContext *s)
return
AVERROR
(
ENOMEM
);
st
->
codec
->
channels
=
1
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_MONO
;
avio_skip
(
pb
,
8
);
// codec_tag used by ByteRun1 decoder to distinguish progressive (PBM) and interlaced (ILBM) content
st
->
codec
->
codec_tag
=
avio_rl32
(
pb
);
...
...
@@ -154,7 +156,13 @@ static int iff_read_header(AVFormatContext *s)
case
ID_CHAN
:
if
(
data_size
<
4
)
return
AVERROR_INVALIDDATA
;
st
->
codec
->
channels
=
(
avio_rb32
(
pb
)
<
6
)
?
1
:
2
;
if
(
avio_rb32
(
pb
)
<
6
)
{
st
->
codec
->
channels
=
1
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_MONO
;
}
else
{
st
->
codec
->
channels
=
2
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_STEREO
;
}
break
;
case
ID_CMAP
:
...
...
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