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
683e421b
Commit
683e421b
authored
Apr 26, 2020
by
Limin Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fftools/ffmpeg: use local variable with same contents directly
Signed-off-by:
Limin Wang
<
lance.lmwang@gmail.com
>
parent
3a822717
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
ffmpeg.c
fftools/ffmpeg.c
+18
-13
No files found.
fftools/ffmpeg.c
View file @
683e421b
...
...
@@ -501,32 +501,37 @@ static void ffmpeg_cleanup(int ret)
FilterGraph
*
fg
=
filtergraphs
[
i
];
avfilter_graph_free
(
&
fg
->
graph
);
for
(
j
=
0
;
j
<
fg
->
nb_inputs
;
j
++
)
{
while
(
av_fifo_size
(
fg
->
inputs
[
j
]
->
frame_queue
))
{
InputFilter
*
ifilter
=
fg
->
inputs
[
j
];
struct
InputStream
*
ist
=
ifilter
->
ist
;
while
(
av_fifo_size
(
ifilter
->
frame_queue
))
{
AVFrame
*
frame
;
av_fifo_generic_read
(
fg
->
inputs
[
j
]
->
frame_queue
,
&
frame
,
av_fifo_generic_read
(
ifilter
->
frame_queue
,
&
frame
,
sizeof
(
frame
),
NULL
);
av_frame_free
(
&
frame
);
}
av_fifo_freep
(
&
fg
->
inputs
[
j
]
->
frame_queue
);
if
(
fg
->
inputs
[
j
]
->
ist
->
sub2video
.
sub_queue
)
{
while
(
av_fifo_size
(
fg
->
inputs
[
j
]
->
ist
->
sub2video
.
sub_queue
))
{
av_fifo_freep
(
&
ifilter
->
frame_queue
);
if
(
ist
->
sub2video
.
sub_queue
)
{
while
(
av_fifo_size
(
ist
->
sub2video
.
sub_queue
))
{
AVSubtitle
sub
;
av_fifo_generic_read
(
fg
->
inputs
[
j
]
->
ist
->
sub2video
.
sub_queue
,
av_fifo_generic_read
(
ist
->
sub2video
.
sub_queue
,
&
sub
,
sizeof
(
sub
),
NULL
);
avsubtitle_free
(
&
sub
);
}
av_fifo_freep
(
&
fg
->
inputs
[
j
]
->
ist
->
sub2video
.
sub_queue
);
av_fifo_freep
(
&
ist
->
sub2video
.
sub_queue
);
}
av_buffer_unref
(
&
fg
->
inputs
[
j
]
->
hw_frames_ctx
);
av_freep
(
&
fg
->
inputs
[
j
]
->
name
);
av_buffer_unref
(
&
ifilter
->
hw_frames_ctx
);
av_freep
(
&
ifilter
->
name
);
av_freep
(
&
fg
->
inputs
[
j
]);
}
av_freep
(
&
fg
->
inputs
);
for
(
j
=
0
;
j
<
fg
->
nb_outputs
;
j
++
)
{
av_freep
(
&
fg
->
outputs
[
j
]
->
name
);
av_freep
(
&
fg
->
outputs
[
j
]
->
formats
);
av_freep
(
&
fg
->
outputs
[
j
]
->
channel_layouts
);
av_freep
(
&
fg
->
outputs
[
j
]
->
sample_rates
);
OutputFilter
*
ofilter
=
fg
->
outputs
[
j
];
av_freep
(
&
ofilter
->
name
);
av_freep
(
&
ofilter
->
formats
);
av_freep
(
&
ofilter
->
channel_layouts
);
av_freep
(
&
ofilter
->
sample_rates
);
av_freep
(
&
fg
->
outputs
[
j
]);
}
av_freep
(
&
fg
->
outputs
);
...
...
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