Commit 34db09b8 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Disable swscale if we don't have it installed

parent 925e40a3
...@@ -28,12 +28,23 @@ ...@@ -28,12 +28,23 @@
#include <vlc/decoder.h> #include <vlc/decoder.h>
#include "vlc_filter.h" #include "vlc_filter.h"
#include <ffmpeg/swscale.h> /* ffmpeg headers */
#include <ffmpeg/avcodec.h> #ifdef HAVE_FFMPEG_AVCODEC_H
#include <ffmpeg/avutil.h> # include <ffmpeg/avcodec.h>
#else
# include <avcodec.h>
#endif
#ifdef HAVE_FFMPEG_SWSCALE_H
# include <ffmpeg/swscale.h>
#else
# include <swscale.h>
#endif
#include "ffmpeg.h" #include "ffmpeg.h"
void *( *swscale_fast_memcpy )( void *, const void *, size_t ); /* Version checking */
#if ( LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0) ) && (defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE))
/***************************************************************************** /*****************************************************************************
* filter_sys_t : filter descriptor * filter_sys_t : filter descriptor
...@@ -52,6 +63,7 @@ struct filter_sys_t ...@@ -52,6 +63,7 @@ struct filter_sys_t
/**************************************************************************** /****************************************************************************
* Local prototypes * Local prototypes
****************************************************************************/ ****************************************************************************/
void *( *swscale_fast_memcpy )( void *, const void *, size_t );
static picture_t *Filter( filter_t *, picture_t * ); static picture_t *Filter( filter_t *, picture_t * );
static int CheckInit( filter_t * ); static int CheckInit( filter_t * );
...@@ -288,3 +300,16 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) ...@@ -288,3 +300,16 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
return p_pic_dst; return p_pic_dst;
} }
#else /* LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0) */
int E_(OpenScaler)( vlc_object_t *p_this )
{
return VLC_EGENERIC;
}
void E_(CloseScaler)( vlc_object_t *p_this )
{
}
#endif /* LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+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