diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-24 22:48:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-24 23:11:34 +0200 |
commit | 437bdf482e928095c1b43681cfeb231a5d2cd5d6 (patch) | |
tree | 16f31ae83fed7cd207aab85f317a875cdd14116b | |
parent | c180f0f6d3981a93242c3ecabd6667434434ea03 (diff) | |
parent | 18db1286b04557aa2d2df7efbcb65ae825d5a469 (diff) | |
download | ffmpeg-437bdf482e928095c1b43681cfeb231a5d2cd5d6.tar.gz |
Merge commit '18db1286b04557aa2d2df7efbcb65ae825d5a469'
* commit '18db1286b04557aa2d2df7efbcb65ae825d5a469':
libxvid: Make codec use the init-cleanup flag and mark it as init-thread-safe
Conflicts:
libavcodec/libxvid.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libxvid.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index b6840ee358..bc971c4c8d 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -826,10 +826,12 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) { struct xvid_context *x = avctx->priv_data; - if(x->encoder_handle) + if (x->encoder_handle) { xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); - x->encoder_handle = NULL; + x->encoder_handle = NULL; + } + av_frame_free(&avctx->coded_frame); av_freep(&avctx->extradata); if (x->twopassbuffer) { av_freep(&x->twopassbuffer); @@ -844,7 +846,6 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) av_freep(&x->twopassfile); av_freep(&x->intra_matrix); av_freep(&x->inter_matrix); - av_frame_free(&avctx->coded_frame); return 0; } @@ -881,4 +882,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, }; |