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
2ef2496c
Commit
2ef2496c
authored
Apr 23, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set channel layout in flac decoder.
parent
539647c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Makefile
libavcodec/Makefile
+1
-1
flac.c
libavcodec/flac.c
+3
-0
No files found.
libavcodec/Makefile
View file @
2ef2496c
...
...
@@ -140,7 +140,7 @@ OBJS-$(CONFIG_FFV1_DECODER) += ffv1.o rangecoder.o
OBJS-$(CONFIG_FFV1_ENCODER)
+=
ffv1.o
rangecoder.o
OBJS-$(CONFIG_FFVHUFF_DECODER)
+=
huffyuv.o
OBJS-$(CONFIG_FFVHUFF_ENCODER)
+=
huffyuv.o
OBJS-$(CONFIG_FLAC_DECODER)
+=
flacdec.o
flacdata.o
flac.o
OBJS-$(CONFIG_FLAC_DECODER)
+=
flacdec.o
flacdata.o
flac.o
vorbis_data.o
OBJS-$(CONFIG_FLAC_ENCODER)
+=
flacenc.o
flacdata.o
flac.o
OBJS-$(CONFIG_FLASHSV_DECODER)
+=
flashsv.o
OBJS-$(CONFIG_FLASHSV_ENCODER)
+=
flashsvenc.o
...
...
libavcodec/flac.c
View file @
2ef2496c
...
...
@@ -22,6 +22,7 @@
#include "libavutil/crc.h"
#include "flac.h"
#include "flacdata.h"
#include "vorbis.h"
static
const
int8_t
sample_size_table
[]
=
{
0
,
8
,
12
,
0
,
16
,
20
,
24
,
0
};
...
...
@@ -54,6 +55,8 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
fi
->
ch_mode
=
get_bits
(
gb
,
4
);
if
(
fi
->
ch_mode
<
FLAC_MAX_CHANNELS
)
{
fi
->
channels
=
fi
->
ch_mode
+
1
;
if
(
fi
->
ch_mode
<=
5
)
avctx
->
channel_layout
=
ff_vorbis_channel_layouts
[
fi
->
ch_mode
];
fi
->
ch_mode
=
FLAC_CHMODE_INDEPENDENT
;
}
else
if
(
fi
->
ch_mode
<=
FLAC_CHMODE_MID_SIDE
)
{
fi
->
channels
=
2
;
...
...
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