This is already taken care of by avcodec_open2().
return VLC_ENOMEM;
}
- p_context->codec_type = AVMEDIA_TYPE_AUDIO;
- p_context->codec_id = p_codec->id;
#if (LIBAVCODEC_VERSION_MAJOR >= 55)
p_context->refcounted_frames = true;
#else
if (!sys)
return VLC_ENOMEM;
- context->codec_type = AVMEDIA_TYPE_SUBTITLE;
- context->codec_id = codec->id;
sys->p_context = context;
sys->p_codec = codec;
sys->b_delayed_open = false;
if( ( p_dec->p_sys = p_sys = calloc( 1, sizeof(decoder_sys_t) ) ) == NULL )
return VLC_ENOMEM;
- p_context->codec_type = AVMEDIA_TYPE_VIDEO;
- p_context->codec_id = p_codec->id;
p_sys->p_context = p_context;
p_sys->p_codec = p_codec;
p_sys->p_ff_pic = avcodec_alloc_frame();