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
cd5f50a2
Commit
cd5f50a2
authored
Mar 15, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: avoid direct access to AVFrame.channels
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
64308941
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
8 deletions
+8
-8
af_aconvert.c
libavfilter/af_aconvert.c
+1
-1
af_afade.c
libavfilter/af_afade.c
+2
-2
af_amerge.c
libavfilter/af_amerge.c
+1
-1
af_apad.c
libavfilter/af_apad.c
+1
-1
af_aresample.c
libavfilter/af_aresample.c
+1
-1
af_biquads.c
libavfilter/af_biquads.c
+1
-1
af_pan.c
libavfilter/af_pan.c
+1
-1
No files found.
libavfilter/af_aconvert.c
View file @
cd5f50a2
...
...
@@ -147,7 +147,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamplesref)
(
void
*
)
insamplesref
->
extended_data
,
n
);
av_frame_copy_props
(
outsamplesref
,
insamplesref
);
outsamplesref
->
channels
=
outlink
->
channels
;
av_frame_set_channels
(
outsamplesref
,
outlink
->
channels
)
;
outsamplesref
->
channel_layout
=
outlink
->
channel_layout
;
ret
=
ff_filter_frame
(
outlink
,
outsamplesref
);
...
...
libavfilter/af_afade.c
View file @
cd5f50a2
...
...
@@ -256,7 +256,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
if
((
!
afade
->
type
&&
(
cur_sample
+
nb_samples
<
afade
->
start_sample
))
||
(
afade
->
type
&&
(
afade
->
start_sample
+
afade
->
nb_samples
<
cur_sample
)))
{
av_samples_set_silence
(
out_buf
->
extended_data
,
0
,
nb_samples
,
out_buf
->
channels
,
out_buf
->
format
);
av_frame_get_channels
(
out_buf
)
,
out_buf
->
format
);
}
else
{
int64_t
start
;
...
...
@@ -266,7 +266,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
start
=
afade
->
start_sample
+
afade
->
nb_samples
-
cur_sample
;
afade
->
fade_samples
(
out_buf
->
extended_data
,
buf
->
extended_data
,
nb_samples
,
buf
->
channels
,
nb_samples
,
av_frame_get_channels
(
buf
)
,
afade
->
type
?
-
1
:
1
,
start
,
afade
->
nb_samples
,
afade
->
curve
);
}
...
...
libavfilter/af_amerge.c
View file @
cd5f50a2
...
...
@@ -263,7 +263,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
outbuf
->
nb_samples
=
nb_samples
;
outbuf
->
channel_layout
=
outlink
->
channel_layout
;
outbuf
->
channels
=
outlink
->
channels
;
av_frame_set_channels
(
outbuf
,
outlink
->
channels
)
;
while
(
nb_samples
)
{
ns
=
nb_samples
;
...
...
libavfilter/af_apad.c
View file @
cd5f50a2
...
...
@@ -122,7 +122,7 @@ static int request_frame(AVFilterLink *outlink)
av_samples_set_silence
(
outsamplesref
->
extended_data
,
0
,
n_out
,
outsamplesref
->
channels
,
av_frame_get_channels
(
outsamplesref
)
,
outsamplesref
->
format
);
outsamplesref
->
pts
=
apad
->
next_pts
;
...
...
libavfilter/af_aresample.c
View file @
cd5f50a2
...
...
@@ -188,7 +188,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamplesref)
av_frame_copy_props
(
outsamplesref
,
insamplesref
);
outsamplesref
->
format
=
outlink
->
format
;
outsamplesref
->
channels
=
outlink
->
channels
;
av_frame_set_channels
(
outsamplesref
,
outlink
->
channels
)
;
outsamplesref
->
channel_layout
=
outlink
->
channel_layout
;
outsamplesref
->
sample_rate
=
outlink
->
sample_rate
;
...
...
libavfilter/af_biquads.c
View file @
cd5f50a2
...
...
@@ -409,7 +409,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
out_buf
->
pts
=
buf
->
pts
;
}
for
(
ch
=
0
;
ch
<
buf
->
channels
;
ch
++
)
for
(
ch
=
0
;
ch
<
av_frame_get_channels
(
buf
)
;
ch
++
)
p
->
filter
(
buf
->
extended_data
[
ch
],
out_buf
->
extended_data
[
ch
],
nb_samples
,
&
p
->
cache
[
ch
].
i1
,
&
p
->
cache
[
ch
].
i2
,
...
...
libavfilter/af_pan.c
View file @
cd5f50a2
...
...
@@ -364,7 +364,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
swr_convert
(
pan
->
swr
,
outsamples
->
data
,
n
,
(
void
*
)
insamples
->
data
,
n
);
av_frame_copy_props
(
outsamples
,
insamples
);
outsamples
->
channel_layout
=
outlink
->
channel_layout
;
outsamples
->
channels
=
outlink
->
channels
;
av_frame_set_channels
(
outsamples
,
outlink
->
channels
)
;
ret
=
ff_filter_frame
(
outlink
,
outsamples
);
av_frame_free
(
&
insamples
);
...
...
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