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
1f7b7d54
Commit
1f7b7d54
authored
Nov 19, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/examples: fix mem issues in filtering_video.
parent
0dd8e96b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
filtering_video.c
doc/examples/filtering_video.c
+3
-0
No files found.
doc/examples/filtering_video.c
View file @
1f7b7d54
...
...
@@ -36,6 +36,7 @@
#include <libavfilter/avcodec.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
#include <libavutil/opt.h>
const
char
*
filter_descr
=
"scale=78:24"
;
...
...
@@ -70,6 +71,7 @@ static int open_input_file(const char *filename)
}
video_stream_index
=
ret
;
dec_ctx
=
fmt_ctx
->
streams
[
video_stream_index
]
->
codec
;
av_opt_set_int
(
dec_ctx
,
"refcounted_frames"
,
1
,
0
);
/* init the video decoder */
if
((
ret
=
avcodec_open2
(
dec_ctx
,
dec
,
NULL
))
<
0
)
{
...
...
@@ -228,6 +230,7 @@ int main(int argc, char **argv)
display_frame
(
filt_frame
,
buffersink_ctx
->
inputs
[
0
]
->
time_base
);
av_frame_unref
(
filt_frame
);
}
av_frame_unref
(
frame
);
}
}
av_free_packet
(
&
packet
);
...
...
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