Commit 106208c9 authored by Laurent Aimar's avatar Laurent Aimar

Called vlc_va_Setup as soon as possible (avcodec).

parent c4ef9658
......@@ -1146,13 +1146,27 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_codec,
continue;
}
if( p_sys->p_va &&
p_sys->p_context->width > 0 && p_sys->p_context->height > 0 )
{
/* We try to call vlc_va_Setup when possible to detect errors when
* possible (later is too late) */
if( vlc_va_Setup( p_sys->p_va,
&p_sys->p_context->hwaccel_context,
&p_dec->fmt_out.video.i_chroma,
p_sys->p_context->width, p_sys->p_context->height ) )
{
msg_Err( p_dec, "vlc_va_Setup failed" );
vlc_va_Delete( p_sys->p_va );
p_sys->p_va = NULL;
}
}
if( p_sys->p_va )
{
/* FIXME this will disabled direct rendering
* even if a new pixel format is renegociated
*
* FIXME Try to call vlc_va_Setup when possible
* to detect errors when possible (later is too late) */
*/
p_sys->b_direct_rendering = false;
p_sys->p_context->draw_horiz_band = NULL;
return pi_fmt[i];
......
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