Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
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)
...
@@ -85,16 +85,18 @@ static int get_stream_info(AVCodecContext *avctx)
}
}
channel_counts
[
ctype
]
++
;
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
,
info
->
numChannels
,
channel_counts
[
ACT_FRONT
],
channel_counts
[
ACT_SIDE
],
channel_counts
[
ACT_FRONT
],
channel_counts
[
ACT_SIDE
],
channel_counts
[
ACT_BACK
],
channel_counts
[
ACT_LFE
],
channel_counts
[
ACT_BACK
],
channel_counts
[
ACT_LFE
],
channel_counts
[
ACT_FRONT_TOP
]
+
channel_counts
[
ACT_SIDE_TOP
]
+
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
])
{
switch
(
channel_counts
[
ACT_FRONT
])
{
case
4
:
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
;
break
;
case
3
:
case
3
:
ch_layout
|=
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
;
ch_layout
|=
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
;
...
@@ -106,8 +108,9 @@ static int get_stream_info(AVCodecContext *avctx)
...
@@ -106,8 +108,9 @@ static int get_stream_info(AVCodecContext *avctx)
ch_layout
|=
AV_CH_FRONT_CENTER
;
ch_layout
|=
AV_CH_FRONT_CENTER
;
break
;
break
;
default:
default:
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of front channels: %d
\n
"
,
av_log
(
avctx
,
AV_LOG_WARNING
,
channel_counts
[
ACT_FRONT
]);
"unsupported number of front channels: %d
\n
"
,
channel_counts
[
ACT_FRONT
]);
ch_error
=
1
;
ch_error
=
1
;
break
;
break
;
}
}
...
@@ -115,7 +118,8 @@ static int get_stream_info(AVCodecContext *avctx)
...
@@ -115,7 +118,8 @@ static int get_stream_info(AVCodecContext *avctx)
if
(
channel_counts
[
ACT_SIDE
]
==
2
)
{
if
(
channel_counts
[
ACT_SIDE
]
==
2
)
{
ch_layout
|=
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
;
ch_layout
|=
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
;
}
else
{
}
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
]);
channel_counts
[
ACT_SIDE
]);
ch_error
=
1
;
ch_error
=
1
;
}
}
...
@@ -132,8 +136,9 @@ static int get_stream_info(AVCodecContext *avctx)
...
@@ -132,8 +136,9 @@ static int get_stream_info(AVCodecContext *avctx)
ch_layout
|=
AV_CH_BACK_CENTER
;
ch_layout
|=
AV_CH_BACK_CENTER
;
break
;
break
;
default:
default:
av_log
(
avctx
,
AV_LOG_WARNING
,
"unsupported number of back channels: %d
\n
"
,
av_log
(
avctx
,
AV_LOG_WARNING
,
channel_counts
[
ACT_BACK
]);
"unsupported number of back channels: %d
\n
"
,
channel_counts
[
ACT_BACK
]);
ch_error
=
1
;
ch_error
=
1
;
break
;
break
;
}
}
...
@@ -142,7 +147,8 @@ static int get_stream_info(AVCodecContext *avctx)
...
@@ -142,7 +147,8 @@ static int get_stream_info(AVCodecContext *avctx)
if
(
channel_counts
[
ACT_LFE
]
==
1
)
{
if
(
channel_counts
[
ACT_LFE
]
==
1
)
{
ch_layout
|=
AV_CH_LOW_FREQUENCY
;
ch_layout
|=
AV_CH_LOW_FREQUENCY
;
}
else
{
}
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
]);
channel_counts
[
ACT_LFE
]);
ch_error
=
1
;
ch_error
=
1
;
}
}
...
@@ -184,14 +190,16 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
...
@@ -184,14 +190,16 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
}
}
if
(
avctx
->
extradata_size
)
{
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
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to set extradata
\n
"
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
}
}
if
(
s
->
conceal_method
!=
CONCEAL_METHOD_DEFAULT
)
{
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
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to set error concealment method
\n
"
);
return
AVERROR_UNKNOWN
;
return
AVERROR_UNKNOWN
;
}
}
...
@@ -241,7 +249,8 @@ static int fdk_aac_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -241,7 +249,8 @@ static int fdk_aac_decode_frame(AVCodecContext *avctx, void *data,
goto
end
;
goto
end
;
}
}
if
(
err
!=
AAC_DEC_OK
)
{
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
;
ret
=
AVERROR_UNKNOWN
;
goto
end
;
goto
end
;
}
}
...
@@ -280,7 +289,8 @@ static av_cold void fdk_aac_decode_flush(AVCodecContext *avctx)
...
@@ -280,7 +289,8 @@ static av_cold void fdk_aac_decode_flush(AVCodecContext *avctx)
if
(
!
s
->
handle
)
if
(
!
s
->
handle
)
return
;
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
"
);
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