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
84784c29
Commit
84784c29
authored
Aug 21, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libfdk-aacdec: formatting cosmetics
parent
8506ff97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
libfdk-aacdec.c
libavcodec/libfdk-aacdec.c
+23
-13
No files found.
libavcodec/libfdk-aacdec.c
View file @
84784c29
...
...
@@ -85,16 +85,18 @@ static int get_stream_info(AVCodecContext *avctx)
}
channel_counts
[
ctype
]
++
;
}
av_log
(
avctx
,
AV_LOG_DEBUG
,
"%d channels - front:%d side:%d back:%d lfe:%d top:%d
\n
"
,
av_log
(
avctx
,
AV_LOG_DEBUG
,
"%d channels - front:%d side:%d back:%d lfe:%d top:%d
\n
"
,
info
->
numChannels
,
channel_counts
[
ACT_FRONT
],
channel_counts
[
ACT_SIDE
],
channel_counts
[
ACT_BACK
],
channel_counts
[
ACT_LFE
],
channel_counts
[
ACT_FRONT_TOP
]
+
channel_counts
[
ACT_SIDE_TOP
]
+
channel_counts
[
ACT_BACK_TOP
]
+
channel_counts
[
ACT_TOP
]);
channel_counts
[
ACT_BACK_TOP
]
+
channel_counts
[
ACT_TOP
]);
switch
(
channel_counts
[
ACT_FRONT
])
{
case
4
:
ch_layout
|=
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
;
ch_layout
|=
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
;
break
;
case
3
:
ch_layout
|=
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
;
...
...
@@ -106,8 +108,9 @@ static int get_stream_info(AVCodecContext *avctx)
ch_layout
|=
AV_CH_FRONT_CENTER
;
break
;
default:
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of front channels: %d
\n
"
,
channel_counts
[
ACT_FRONT
]);
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of front channels: %d
\n
"
,
channel_counts
[
ACT_FRONT
]);
ch_error
=
1
;
break
;
}
...
...
@@ -115,7 +118,8 @@ static int get_stream_info(AVCodecContext *avctx)
if
(
channel_counts
[
ACT_SIDE
]
==
2
)
{
ch_layout
|=
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
;
}
else
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of side channels: %d
\n
"
,
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of side channels: %d
\n
"
,
channel_counts
[
ACT_SIDE
]);
ch_error
=
1
;
}
...
...
@@ -132,8 +136,9 @@ static int get_stream_info(AVCodecContext *avctx)
ch_layout
|=
AV_CH_BACK_CENTER
;
break
;
default:
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of back channels: %d
\n
"
,
channel_counts
[
ACT_BACK
]);
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of back channels: %d
\n
"
,
channel_counts
[
ACT_BACK
]);
ch_error
=
1
;
break
;
}
...
...
@@ -142,7 +147,8 @@ static int get_stream_info(AVCodecContext *avctx)
if
(
channel_counts
[
ACT_LFE
]
==
1
)
{
ch_layout
|=
AV_CH_LOW_FREQUENCY
;
}
else
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of LFE channels: %d
\n
"
,
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of LFE channels: %d
\n
"
,
channel_counts
[
ACT_LFE
]);
ch_error
=
1
;
}
...
...
@@ -184,14 +190,16 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
}
if
(
avctx
->
extradata_size
)
{
if
((
err
=
aacDecoder_ConfigRaw
(
s
->
handle
,
&
avctx
->
extradata
,
&
avctx
->
extradata_size
))
!=
AAC_DEC_OK
)
{
if
((
err
=
aacDecoder_ConfigRaw
(
s
->
handle
,
&
avctx
->
extradata
,
&
avctx
->
extradata_size
))
!=
AAC_DEC_OK
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to set extradata
\n
"
);
return
AVERROR_INVALIDDATA
;
}
}
if
(
s
->
conceal_method
!=
CONCEAL_METHOD_DEFAULT
)
{
if
((
err
=
aacDecoder_SetParam
(
s
->
handle
,
AAC_CONCEAL_METHOD
,
s
->
conceal_method
))
!=
AAC_DEC_OK
)
{
if
((
err
=
aacDecoder_SetParam
(
s
->
handle
,
AAC_CONCEAL_METHOD
,
s
->
conceal_method
))
!=
AAC_DEC_OK
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to set error concealment method
\n
"
);
return
AVERROR_UNKNOWN
;
}
...
...
@@ -241,7 +249,8 @@ static int fdk_aac_decode_frame(AVCodecContext *avctx, void *data,
goto
end
;
}
if
(
err
!=
AAC_DEC_OK
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"aacDecoder_DecodeFrame() failed: %x
\n
"
,
err
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"aacDecoder_DecodeFrame() failed: %x
\n
"
,
err
);
ret
=
AVERROR_UNKNOWN
;
goto
end
;
}
...
...
@@ -280,7 +289,8 @@ static av_cold void fdk_aac_decode_flush(AVCodecContext *avctx)
if
(
!
s
->
handle
)
return
;
if
((
err
=
aacDecoder_SetParam
(
s
->
handle
,
AAC_TPDEC_CLEAR_BUFFER
,
1
))
!=
AAC_DEC_OK
)
if
((
err
=
aacDecoder_SetParam
(
s
->
handle
,
AAC_TPDEC_CLEAR_BUFFER
,
1
))
!=
AAC_DEC_OK
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"failed to clear buffer when flushing
\n
"
);
}
...
...
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