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
11d1ca4b
Commit
11d1ca4b
authored
Sep 21, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use avcodec_free_frame() to free AVFrames.
parent
9eb29657
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
avconv.c
avconv.c
+2
-2
avplay.c
avplay.c
+2
-2
api-example.c
libavcodec/api-example.c
+4
-4
vsrc_movie.c
libavfilter/vsrc_movie.c
+1
-1
output-example.c
libavformat/output-example.c
+1
-0
No files found.
avconv.c
View file @
11d1ca4b
...
...
@@ -180,11 +180,11 @@ void exit_program(int ret)
bsfc
=
next
;
}
output_streams
[
i
]
->
bitstream_filters
=
NULL
;
avcodec_free_frame
(
&
output_streams
[
i
]
->
filtered_frame
);
av_freep
(
&
output_streams
[
i
]
->
forced_keyframes
);
av_freep
(
&
output_streams
[
i
]
->
avfilter
);
av_freep
(
&
output_streams
[
i
]
->
logfile_prefix
);
av_freep
(
&
output_streams
[
i
]
->
filtered_frame
);
av_freep
(
&
output_streams
[
i
]);
}
for
(
i
=
0
;
i
<
nb_input_files
;
i
++
)
{
...
...
@@ -192,7 +192,7 @@ void exit_program(int ret)
av_freep
(
&
input_files
[
i
]);
}
for
(
i
=
0
;
i
<
nb_input_streams
;
i
++
)
{
av
_freep
(
&
input_streams
[
i
]
->
decoded_frame
);
av
codec_free_frame
(
&
input_streams
[
i
]
->
decoded_frame
);
av_dict_free
(
&
input_streams
[
i
]
->
opts
);
free_buffer_pool
(
&
input_streams
[
i
]
->
buffer_pool
);
av_freep
(
&
input_streams
[
i
]
->
filters
);
...
...
avplay.c
View file @
11d1ca4b
...
...
@@ -1704,7 +1704,7 @@ static int video_thread(void *arg)
avfilter_graph_free
(
&
graph
);
#endif
av_free_packet
(
&
pkt
);
av
_free
(
frame
);
av
codec_free_frame
(
&
frame
);
return
0
;
}
...
...
@@ -2191,7 +2191,7 @@ static void stream_component_close(VideoState *is, int stream_index)
avresample_free
(
&
is
->
avr
);
av_freep
(
&
is
->
audio_buf1
);
is
->
audio_buf
=
NULL
;
av
_freep
(
&
is
->
frame
);
av
codec_free_frame
(
&
is
->
frame
);
if
(
is
->
rdft
)
{
av_rdft_end
(
is
->
rdft
);
...
...
libavcodec/api-example.c
View file @
11d1ca4b
...
...
@@ -212,7 +212,7 @@ static void audio_encode_example(const char *filename)
fclose
(
f
);
av_freep
(
&
samples
);
av
_freep
(
&
frame
);
av
codec_free_frame
(
&
frame
);
avcodec_close
(
c
);
av_free
(
c
);
}
...
...
@@ -308,7 +308,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
avcodec_close
(
c
);
av_free
(
c
);
av
_free
(
decoded_frame
);
av
codec_free_frame
(
&
decoded_frame
);
}
/*
...
...
@@ -432,7 +432,7 @@ static void video_encode_example(const char *filename)
avcodec_close
(
c
);
av_free
(
c
);
av_freep
(
&
picture
->
data
[
0
]);
av
_free
(
picture
);
av
codec_free_frame
(
&
picture
);
printf
(
"
\n
"
);
}
...
...
@@ -568,7 +568,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
avcodec_close
(
c
);
av_free
(
c
);
av
_free
(
picture
);
av
codec_free_frame
(
&
picture
);
printf
(
"
\n
"
);
}
...
...
libavfilter/vsrc_movie.c
View file @
11d1ca4b
...
...
@@ -197,7 +197,7 @@ static av_cold void uninit(AVFilterContext *ctx)
if
(
movie
->
format_ctx
)
avformat_close_input
(
&
movie
->
format_ctx
);
avfilter_unref_buffer
(
movie
->
picref
);
av
_freep
(
&
movie
->
frame
);
av
codec_free_frame
(
&
movie
->
frame
);
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
...
...
libavformat/output-example.c
View file @
11d1ca4b
...
...
@@ -165,6 +165,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
fprintf
(
stderr
,
"Error while writing audio frame
\n
"
);
exit
(
1
);
}
avcodec_free_frame
(
&
frame
);
}
static
void
close_audio
(
AVFormatContext
*
oc
,
AVStream
*
st
)
...
...
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