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
18db1286
Commit
18db1286
authored
Apr 06, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libxvid: Make codec use the init-cleanup flag and mark it as init-thread-safe
This takes care of memory leaks on init error.
parent
eae7338e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
libxvid.c
libavcodec/libxvid.c
+8
-1
No files found.
libavcodec/libxvid.c
View file @
18db1286
...
...
@@ -33,6 +33,7 @@
#include "libavutil/mathematics.h"
#include "avcodec.h"
#include "internal.h"
#include "libxvid.h"
#include "mpegvideo.h"
...
...
@@ -778,8 +779,12 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx)
{
struct
xvid_context
*
x
=
avctx
->
priv_data
;
if
(
x
->
encoder_handle
)
{
xvid_encore
(
x
->
encoder_handle
,
XVID_ENC_DESTROY
,
NULL
,
NULL
);
x
->
encoder_handle
=
NULL
;
}
av_frame_free
(
&
avctx
->
coded_frame
);
av_freep
(
&
avctx
->
extradata
);
if
(
x
->
twopassbuffer
)
{
av_free
(
x
->
twopassbuffer
);
...
...
@@ -824,4 +829,6 @@ AVCodec ff_libxvid_encoder = {
.
close
=
xvid_encode_close
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[])
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_NONE
},
.
priv_class
=
&
xvid_class
,
.
caps_internal
=
FF_CODEC_CAP_INIT_THREADSAFE
|
FF_CODEC_CAP_INIT_CLEANUP
,
};
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