Commit 0ec02c3d authored by Rafaël Carré's avatar Rafaël Carré Committed by Rémi Denis-Courmont

ffmpeg_GetFrameBuf: simplify

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 67464c07
......@@ -901,6 +901,9 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
/* */
p_ff_pic->opaque = NULL;
#if LIBAVCODEC_VERSION_MAJOR < 54
p_ff_pic->age = 256*256*256*64;
#endif
if( p_sys->p_va )
{
......@@ -913,18 +916,13 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
return -1;
}
/* */
p_ff_pic->type = FF_BUFFER_TYPE_USER;
#if LIBAVCODEC_VERSION_MAJOR < 54
p_ff_pic->age = 256*256*256*64;
#endif
if( vlc_va_Get( p_sys->p_va, p_ff_pic ) )
{
msg_Err( p_dec, "VaGrabSurface failed" );
return -1;
}
p_ff_pic->type = FF_BUFFER_TYPE_USER;
return 0;
}
else if( !p_sys->b_direct_rendering )
......@@ -1008,10 +1006,6 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
p_ff_pic->linesize[2] = p_pic->p[2].i_pitch;
p_ff_pic->linesize[3] = 0;
#if LIBAVCODEC_VERSION_MAJOR < 54
p_ff_pic->age = 256*256*256*64;
#endif
post_mt( p_sys );
return 0;
......
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