Commit 02afcb88 authored by Jean-Paul Saman's avatar Jean-Paul Saman

codec/avcodec: Fix version defines for avcodec.

Fix version defines for avcodec.
parent e20f4c9d
...@@ -42,9 +42,11 @@ ...@@ -42,9 +42,11 @@
#endif #endif
#include "libavutil/audioconvert.h" #include "libavutil/audioconvert.h"
#include <libavutil/samplefmt.h>
#include "avcodec.h" #include "avcodec.h"
/***************************************************************************** /*****************************************************************************
* decoder_sys_t : decoder descriptor * decoder_sys_t : decoder descriptor
*****************************************************************************/ *****************************************************************************/
......
...@@ -319,14 +319,18 @@ int ffmpeg_OpenCodec( decoder_t *p_dec ); ...@@ -319,14 +319,18 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
# define AV_PICTURE_TYPE_B FF_B_TYPE # define AV_PICTURE_TYPE_B FF_B_TYPE
# define AV_PICTURE_TYPE_I FF_I_TYPE # define AV_PICTURE_TYPE_I FF_I_TYPE
# define AV_PICTURE_TYPE_P FF_P_TYPE # define AV_PICTURE_TYPE_P FF_P_TYPE
#endif
#if LIBAVCODEC_VERSION_MAJOR < 53
# define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE # define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
# define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8 # define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8
# define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16 # define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16
# define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32 # define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32
# define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT # define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT
# define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL # define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL
#endif
#if LIBAVCODEC_VERSION_MAJOR < 52
# define CH_FRONT_LEFT AV_CH_FRONT_LEFT # define CH_FRONT_LEFT AV_CH_FRONT_LEFT
# define CH_FRONT_RIGHT AV_CH_FRONT_RIGHT # define CH_FRONT_RIGHT AV_CH_FRONT_RIGHT
# define CH_FRONT_CENTER AV_CH_FRONT_CENTER # define CH_FRONT_CENTER AV_CH_FRONT_CENTER
...@@ -347,8 +351,6 @@ int ffmpeg_OpenCodec( decoder_t *p_dec ); ...@@ -347,8 +351,6 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
# define CH_TOP_BACK_RIGHT AV_CH_TOP_BACK_RIGHT # define CH_TOP_BACK_RIGHT AV_CH_TOP_BACK_RIGHT
# define CH_STEREO_LEFT AV_CH_STEREO_LEFT # define CH_STEREO_LEFT AV_CH_STEREO_LEFT
# define CH_STEREO_RIGHT AV_CH_STEREO_RIGHT # define CH_STEREO_RIGHT AV_CH_STEREO_RIGHT
#endif #endif
#ifndef AV_PKT_FLAG_KEY #ifndef AV_PKT_FLAG_KEY
......
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
# include <avcodec.h> # include <avcodec.h>
#endif #endif
#include <libavutil/samplefmt.h>
#include "avcodec.h" #include "avcodec.h"
#define HURRY_UP_GUARD1 (450000) #define HURRY_UP_GUARD1 (450000)
......
...@@ -1020,6 +1020,7 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context, ...@@ -1020,6 +1020,7 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
msg_Err( p_dec, "vlc_va_Setup failed" ); msg_Err( p_dec, "vlc_va_Setup failed" );
return -1; return -1;
} }
msg_Info( p_dec, "vlc_va_Setup" );
#else #else
assert(0); assert(0);
#endif #endif
...@@ -1033,7 +1034,7 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context, ...@@ -1033,7 +1034,7 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
if( vlc_va_Get( p_sys->p_va, p_ff_pic ) ) if( vlc_va_Get( p_sys->p_va, p_ff_pic ) )
{ {
msg_Err( p_dec, "VaGrabSurface failed" ); msg_Err( p_dec, "vaGrabSurface failed" );
return -1; return -1;
} }
} }
......
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