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
1d8d987b
Commit
1d8d987b
authored
Sep 17, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asrc_anullsrc: globally prefer "null" over "priv" for indicating the filter context
More locally and globally consistent.
parent
17d2fee7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
asrc_anullsrc.c
libavfilter/asrc_anullsrc.c
+14
-14
No files found.
libavfilter/asrc_anullsrc.c
View file @
1d8d987b
...
@@ -62,23 +62,23 @@ static const AVClass anullsrc_class = {
...
@@ -62,23 +62,23 @@ static const AVClass anullsrc_class = {
static
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
,
void
*
opaque
)
static
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
,
void
*
opaque
)
{
{
ANullContext
*
priv
=
ctx
->
priv
;
ANullContext
*
null
=
ctx
->
priv
;
int
ret
;
int
ret
;
priv
->
class
=
&
anullsrc_class
;
null
->
class
=
&
anullsrc_class
;
av_opt_set_defaults
(
priv
);
av_opt_set_defaults
(
null
);
if
((
ret
=
(
av_set_options_string
(
priv
,
args
,
"="
,
":"
)))
<
0
)
{
if
((
ret
=
(
av_set_options_string
(
null
,
args
,
"="
,
":"
)))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing options string: '%s'
\n
"
,
args
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing options string: '%s'
\n
"
,
args
);
return
ret
;
return
ret
;
}
}
if
((
ret
=
ff_parse_sample_rate
(
&
priv
->
sample_rate
,
if
((
ret
=
ff_parse_sample_rate
(
&
null
->
sample_rate
,
priv
->
sample_rate_str
,
ctx
))
<
0
)
null
->
sample_rate_str
,
ctx
))
<
0
)
return
ret
;
return
ret
;
if
((
ret
=
ff_parse_channel_layout
(
&
priv
->
channel_layout
,
if
((
ret
=
ff_parse_channel_layout
(
&
null
->
channel_layout
,
priv
->
channel_layout_str
,
ctx
))
<
0
)
null
->
channel_layout_str
,
ctx
))
<
0
)
return
ret
;
return
ret
;
return
0
;
return
0
;
...
@@ -86,18 +86,18 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
...
@@ -86,18 +86,18 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
static
int
config_props
(
AVFilterLink
*
outlink
)
static
int
config_props
(
AVFilterLink
*
outlink
)
{
{
ANullContext
*
priv
=
outlink
->
src
->
priv
;
ANullContext
*
null
=
outlink
->
src
->
priv
;
char
buf
[
128
];
char
buf
[
128
];
int
chans_nb
;
int
chans_nb
;
outlink
->
sample_rate
=
priv
->
sample_rate
;
outlink
->
sample_rate
=
null
->
sample_rate
;
outlink
->
channel_layout
=
priv
->
channel_layout
;
outlink
->
channel_layout
=
null
->
channel_layout
;
chans_nb
=
av_get_channel_layout_nb_channels
(
priv
->
channel_layout
);
chans_nb
=
av_get_channel_layout_nb_channels
(
null
->
channel_layout
);
av_get_channel_layout_string
(
buf
,
sizeof
(
buf
),
chans_nb
,
priv
->
channel_layout
);
av_get_channel_layout_string
(
buf
,
sizeof
(
buf
),
chans_nb
,
null
->
channel_layout
);
av_log
(
outlink
->
src
,
AV_LOG_INFO
,
av_log
(
outlink
->
src
,
AV_LOG_INFO
,
"sample_rate:%d channel_layout:'%s' nb_samples:%d
\n
"
,
"sample_rate:%d channel_layout:'%s' nb_samples:%d
\n
"
,
priv
->
sample_rate
,
buf
,
priv
->
nb_samples
);
null
->
sample_rate
,
buf
,
null
->
nb_samples
);
return
0
;
return
0
;
}
}
...
...
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