Commit a9ac9434 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: fix double free

parent 8ac5cc82
......@@ -341,7 +341,6 @@ static void CloseDecoder( vlc_object_t *p_this )
decoder_sys_t *p_sys = p_dec->p_sys;
av_free( p_sys->p_context->extradata );
avcodec_free_context( &p_sys->p_context );
free( p_sys );
}
......
......@@ -42,7 +42,12 @@
static inline void avcodec_free_context( AVCodecContext **ctx )
{
av_freep( ctx );
if( !*ctx )
return;
av_free( (*ctx)->extradata );
av_free( *ctx );
*ctx = NULL;
}
#endif
......
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