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
664f0aac
Commit
664f0aac
authored
May 17, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavfilter: src_buffer, use only aresample, not aconvert.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
13fdb355
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
25 deletions
+9
-25
src_buffer.c
libavfilter/src_buffer.c
+9
-25
No files found.
libavfilter/src_buffer.c
View file @
664f0aac
...
@@ -215,19 +215,25 @@ static int check_format_change_audio(AVFilterContext *ctx,
...
@@ -215,19 +215,25 @@ static int check_format_change_audio(AVFilterContext *ctx,
int
ret
,
logged
=
0
;
int
ret
,
logged
=
0
;
link
=
ctx
->
outputs
[
0
];
link
=
ctx
->
outputs
[
0
];
if
(
samplesref
->
audio
->
sample_rate
!=
link
->
sample_rate
)
{
if
(
samplesref
->
audio
->
sample_rate
!=
link
->
sample_rate
||
samplesref
->
format
!=
link
->
format
||
samplesref
->
audio
->
channel_layout
!=
link
->
channel_layout
)
{
log_input_change
(
ctx
,
link
,
samplesref
);
log_input_change
(
ctx
,
link
,
samplesref
);
logged
=
1
;
logged
=
1
;
abuffer
->
sample_rate
=
samplesref
->
audio
->
sample_rate
;
abuffer
->
sample_rate
=
samplesref
->
audio
->
sample_rate
;
abuffer
->
sample_format
=
samplesref
->
format
;
abuffer
->
channel_layout
=
samplesref
->
audio
->
channel_layout
;
if
(
!
abuffer
->
aresample
)
{
if
(
!
abuffer
->
aresample
)
{
ret
=
insert_filter
(
abuffer
,
link
,
&
abuffer
->
aresample
,
"aresample"
);
ret
=
insert_filter
(
abuffer
,
link
,
&
abuffer
->
aresample
,
"aresample"
);
if
(
ret
<
0
)
return
ret
;
if
(
ret
<
0
)
return
ret
;
}
else
{
}
else
{
link
=
abuffer
->
aresample
->
outputs
[
0
];
link
=
abuffer
->
aresample
->
outputs
[
0
];
if
(
samplesref
->
audio
->
sample_rate
==
link
->
sample_rate
)
if
(
samplesref
->
audio
->
sample_rate
==
link
->
sample_rate
&&
samplesref
->
format
==
link
->
format
&&
samplesref
->
audio
->
channel_layout
==
link
->
channel_layout
)
remove_filter
(
&
abuffer
->
aresample
);
remove_filter
(
&
abuffer
->
aresample
);
else
else
if
((
ret
=
reconfigure_filter
(
abuffer
,
abuffer
->
aresample
))
<
0
)
if
((
ret
=
reconfigure_filter
(
abuffer
,
abuffer
->
aresample
))
<
0
)
...
@@ -235,28 +241,6 @@ static int check_format_change_audio(AVFilterContext *ctx,
...
@@ -235,28 +241,6 @@ static int check_format_change_audio(AVFilterContext *ctx,
}
}
}
}
link
=
ctx
->
outputs
[
0
];
if
(
samplesref
->
format
!=
link
->
format
||
samplesref
->
audio
->
channel_layout
!=
link
->
channel_layout
)
{
if
(
!
logged
)
log_input_change
(
ctx
,
link
,
samplesref
);
abuffer
->
sample_format
=
samplesref
->
format
;
abuffer
->
channel_layout
=
samplesref
->
audio
->
channel_layout
;
if
(
!
abuffer
->
aconvert
)
{
ret
=
insert_filter
(
abuffer
,
link
,
&
abuffer
->
aconvert
,
"aconvert"
);
if
(
ret
<
0
)
return
ret
;
}
else
{
link
=
abuffer
->
aconvert
->
outputs
[
0
];
if
(
samplesref
->
format
==
link
->
format
&&
samplesref
->
audio
->
channel_layout
==
link
->
channel_layout
)
remove_filter
(
&
abuffer
->
aconvert
);
else
if
((
ret
=
reconfigure_filter
(
abuffer
,
abuffer
->
aconvert
))
<
0
)
return
ret
;
}
}
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