Commit fe792c5e authored by Laurent Aimar's avatar Laurent Aimar

Compilation fix for old ffmpeg version.

parent 2d81a38b
...@@ -31,7 +31,9 @@ ...@@ -31,7 +31,9 @@
#ifdef HAVE_LIBAVCODEC_AVCODEC_H #ifdef HAVE_LIBAVCODEC_AVCODEC_H
# include <libavcodec/avcodec.h> # include <libavcodec/avcodec.h>
# ifdef HAVE_AVCODEC_VAAPI
# include <libavcodec/vaapi.h> # include <libavcodec/vaapi.h>
# endif
#elif defined(HAVE_FFMPEG_AVCODEC_H) #elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h> # include <ffmpeg/avcodec.h>
#else #else
......
...@@ -933,6 +933,8 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context, ...@@ -933,6 +933,8 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
if( p_sys->p_va ) if( p_sys->p_va )
{ {
#ifdef HAVE_AVCODEC_VAAPI
/* hwaccel_context is not present in old fffmpeg version */
if( VaSetup( p_sys->p_va, if( VaSetup( p_sys->p_va,
&p_sys->p_context->hwaccel_context, &p_dec->fmt_out.video.i_chroma, &p_sys->p_context->hwaccel_context, &p_dec->fmt_out.video.i_chroma,
p_sys->p_context->width, p_sys->p_context->height ) ) p_sys->p_context->width, p_sys->p_context->height ) )
...@@ -940,6 +942,9 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context, ...@@ -940,6 +942,9 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
msg_Err( p_dec, "VaSetup failed" ); msg_Err( p_dec, "VaSetup failed" );
return -1; return -1;
} }
#else
assert(0);
#endif
/* */ /* */
p_ff_pic->type = FF_BUFFER_TYPE_USER; p_ff_pic->type = FF_BUFFER_TYPE_USER;
......
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