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
e700e21b
Commit
e700e21b
authored
Sep 04, 2016
by
Burt P
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
af_hdcd: move decoding setup from init to config_input
Signed-off-by:
Burt P
<
pburt0@gmail.com
>
parent
91be2ad7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
af_hdcd.c
libavfilter/af_hdcd.c
+21
-19
No files found.
libavfilter/af_hdcd.c
View file @
e700e21b
...
@@ -1777,31 +1777,15 @@ static av_cold void uninit(AVFilterContext *ctx)
...
@@ -1777,31 +1777,15 @@ static av_cold void uninit(AVFilterContext *ctx)
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
{
{
HDCDContext
*
s
=
ctx
->
priv
;
HDCDContext
*
s
=
ctx
->
priv
;
int
c
;
s
->
sample_count
=
0
;
s
->
sample_count
=
0
;
s
->
fctx
=
ctx
;
s
->
fctx
=
ctx
;
s
->
bad_config
=
0
;
s
->
bad_config
=
0
;
hdcd_detect_reset
(
&
s
->
detect
);
if
(
s
->
disable_autoconvert
)
{
for
(
c
=
0
;
c
<
HDCD_MAX_CHANNELS
;
c
++
)
{
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Disabling automatic format conversion.
\n
"
);
hdcd_reset
(
&
s
->
state
[
c
],
44100
,
s
->
cdt_ms
);
}
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"CDT period: %dms (%u samples @44100Hz)
\n
"
,
s
->
cdt_ms
,
s
->
state
[
0
].
sustain_reset
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Process mode: %s
\n
"
,
(
s
->
process_stereo
)
?
"process stereo channels together"
:
"process each channel separately"
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Force PE: %s
\n
"
,
(
s
->
force_pe
)
?
"on"
:
"off"
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Analyze mode: [%d] %s
\n
"
,
s
->
analyze_mode
,
ana_mode_str
[
s
->
analyze_mode
]
);
if
(
s
->
disable_autoconvert
)
avfilter_graph_set_auto_convert
(
ctx
->
graph
,
AVFILTER_AUTO_CONVERT_NONE
);
avfilter_graph_set_auto_convert
(
ctx
->
graph
,
AVFILTER_AUTO_CONVERT_NONE
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Auto-convert: %s (requested: %s)
\n
"
,
}
(
ctx
->
graph
->
disable_auto_convert
)
?
"disabled"
:
"enabled"
,
(
s
->
disable_autoconvert
)
?
"disable"
:
"do not disable"
);
return
0
;
return
0
;
}
}
...
@@ -1809,11 +1793,29 @@ static int config_input(AVFilterLink *inlink) {
...
@@ -1809,11 +1793,29 @@ static int config_input(AVFilterLink *inlink) {
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
HDCDContext
*
s
=
ctx
->
priv
;
HDCDContext
*
s
=
ctx
->
priv
;
AVFilterLink
*
lk
;
AVFilterLink
*
lk
;
int
c
;
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Auto-convert: %s
\n
"
,
(
ctx
->
graph
->
disable_auto_convert
)
?
"disabled"
:
"enabled"
);
hdcd_detect_reset
(
&
s
->
detect
);
for
(
c
=
0
;
c
<
HDCD_MAX_CHANNELS
;
c
++
)
{
hdcd_reset
(
&
s
->
state
[
c
],
inlink
->
sample_rate
,
s
->
cdt_ms
);
}
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"CDT period: %dms (%u samples @44100Hz)
\n
"
,
s
->
cdt_ms
,
s
->
state
[
0
].
sustain_reset
);
if
(
inlink
->
channels
!=
2
&&
s
->
process_stereo
)
{
if
(
inlink
->
channels
!=
2
&&
s
->
process_stereo
)
{
av_log
(
ctx
,
AV_LOG_WARNING
,
"process_stereo disabled (channels = %d)"
,
inlink
->
channels
);
av_log
(
ctx
,
AV_LOG_WARNING
,
"process_stereo disabled (channels = %d)"
,
inlink
->
channels
);
s
->
process_stereo
=
0
;
s
->
process_stereo
=
0
;
}
}
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Process mode: %s
\n
"
,
(
s
->
process_stereo
)
?
"process stereo channels together"
:
"process each channel separately"
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Force PE: %s
\n
"
,
(
s
->
force_pe
)
?
"on"
:
"off"
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Analyze mode: [%d] %s
\n
"
,
s
->
analyze_mode
,
ana_mode_str
[
s
->
analyze_mode
]
);
lk
=
inlink
;
lk
=
inlink
;
while
(
lk
!=
NULL
)
{
while
(
lk
!=
NULL
)
{
...
...
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