Commit 768c27bf authored by gbazin's avatar gbazin

* modules/codec/ffmpeg/encoder.c: fmt_out.p_extra needs to be malloc()ed.

parent b0d6d5d0
......@@ -601,7 +601,12 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
vlc_mutex_unlock( lockval.p_address );
p_enc->fmt_out.i_extra = p_context->extradata_size;
p_enc->fmt_out.p_extra = p_context->extradata;
if( p_enc->fmt_out.i_extra )
{
p_enc->fmt_out.p_extra = malloc( p_enc->fmt_out.i_extra );
memcpy( p_enc->fmt_out.p_extra, p_context->extradata,
p_enc->fmt_out.i_extra );
}
p_context->flags &= ~CODEC_FLAG_GLOBAL_HEADER;
if( p_enc->fmt_in.i_cat == AUDIO_ES )
......
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