Commit eb14ae7d authored by Jean-Paul Saman's avatar Jean-Paul Saman

avcodec/video.c: cleanup (deindent ffmpeg_GetFormat)

parent 71bd25d9
......@@ -1196,8 +1196,9 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
p_dec->fmt_in.i_level = p_context->level;
p_va = vlc_va_New( VLC_OBJECT(p_dec), p_sys->i_codec_id, &p_dec->fmt_in );
if( p_va != NULL )
{
if( p_va == NULL )
goto end;
/* Try too look for a supported hw acceleration */
for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
{
......@@ -1223,8 +1224,8 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
p_va->description );
p_sys->b_direct_rendering = p_va->direct_rendering;
msg_Info( p_dec, "VAAPI uses direct rendering: %s",
p_sys->b_direct_rendering ? "yes" : "no" );
msg_Info( p_dec, "hw acceleration %s direct rendering",
p_sys->b_direct_rendering ? "use" : "does not use" );
p_sys->p_va = p_va;
p_context->draw_horiz_band = NULL;
return pi_fmt[i];
......@@ -1232,10 +1233,10 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
msg_Err( p_dec, "acceleration not available" );
vlc_va_Delete( p_va );
}
p_sys->p_va = NULL;
end:
/* Fallback to default behaviour */
return avcodec_default_get_format( p_context, pi_fmt );
}
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