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
6c936416
Commit
6c936416
authored
Apr 25, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warn if the source has unsupported (or no) channel layout.
parent
f27ac6d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
flacenc.c
libavcodec/flacenc.c
+22
-0
No files found.
libavcodec/flacenc.c
View file @
6c936416
...
...
@@ -425,6 +425,28 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
if
(
channels
==
3
&&
avctx
->
channel_layout
!=
(
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
)
||
channels
==
4
&&
avctx
->
channel_layout
!=
AV_CH_LAYOUT_2_2
&&
avctx
->
channel_layout
!=
AV_CH_LAYOUT_QUAD
||
channels
==
5
&&
avctx
->
channel_layout
!=
AV_CH_LAYOUT_5POINT0
&&
avctx
->
channel_layout
!=
AV_CH_LAYOUT_5POINT0_BACK
||
channels
==
6
&&
avctx
->
channel_layout
!=
AV_CH_LAYOUT_5POINT1
&&
avctx
->
channel_layout
!=
AV_CH_LAYOUT_5POINT1_BACK
)
{
if
(
avctx
->
channel_layout
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Channel layout not supported by Flac, "
"output stream will have incorrect "
"channel layout.
\n
"
);
}
else
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"No channel layout specified. The encoder "
"will use Flac channel layout for "
"%d channels.
\n
"
,
channels
);
}
}
ret
=
ff_lpc_init
(
&
s
->
lpc_ctx
,
avctx
->
frame_size
,
s
->
options
.
max_prediction_order
,
AV_LPC_TYPE_LEVINSON
);
...
...
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