Commit 667bf156 authored by Michael Niedermayer's avatar Michael Niedermayer

libxvid: check & clear encoder_handle

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8fe59240
...@@ -735,7 +735,9 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -735,7 +735,9 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
static av_cold int xvid_encode_close(AVCodecContext *avctx) { static av_cold int xvid_encode_close(AVCodecContext *avctx) {
struct xvid_context *x = avctx->priv_data; struct xvid_context *x = avctx->priv_data;
xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); if(x->encoder_handle)
xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL);
x->encoder_handle = NULL;
av_freep(&avctx->extradata); av_freep(&avctx->extradata);
if( x->twopassbuffer != NULL ) { if( x->twopassbuffer != NULL ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment