diff options
author | Stephen Hutchinson <qyot27@gmail.com> | 2013-10-28 16:52:43 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-28 22:24:58 +0100 |
commit | bd97ba72dc6f2264df627612f0cee75e0c972dad (patch) | |
tree | 8a07b3d8f2d5aabef5fc25445df98f6c882cb9b7 /libavformat/avisynth.c | |
parent | 69a042ee95c60d429f6dd6473caa1a88381a4da2 (diff) | |
download | ffmpeg-bd97ba72dc6f2264df627612f0cee75e0c972dad.tar.gz |
avisynth: Introduce USING_AVISYNTH macro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avisynth.c')
-rw-r--r-- | libavformat/avisynth.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index d3992426d4..3e52a0698b 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -39,6 +39,7 @@ #include "compat/avisynth/avisynth_c.h" #include "compat/avisynth/avisynth_c_25.h" #define AVISYNTH_LIB "avisynth" + #define USING_AVISYNTH #else #include <dlfcn.h> #include "compat/avisynth/avxsynth_c.h" @@ -241,7 +242,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) { st->nb_frames = avs->vi->num_frames; switch (avs->vi->pixel_type) { -#ifdef _WIN32 +#ifdef USING_AVISYNTH case AVS_CS_YV24: st->codec->pix_fmt = AV_PIX_FMT_YUV444P; planar = 1; @@ -359,7 +360,7 @@ static int avisynth_open_file(AVFormatContext *s) { AviSynthContext *avs = (AviSynthContext *)s->priv_data; AVS_Value arg, val; int ret; -#ifdef _WIN32 +#ifdef USING_AVISYNTH char filename_ansi[MAX_PATH * 4]; wchar_t filename_wc[MAX_PATH * 4]; #endif @@ -367,7 +368,7 @@ static int avisynth_open_file(AVFormatContext *s) { if (ret = avisynth_context_create(s)) return ret; -#ifdef _WIN32 +#ifdef USING_AVISYNTH // Convert UTF-8 to ANSI code page MultiByteToWideChar(CP_UTF8, 0, s->filename, -1, filename_wc, MAX_PATH * 4); WideCharToMultiByte(CP_THREAD_ACP, 0, filename_wc, -1, filename_ansi, MAX_PATH * 4, NULL, NULL); @@ -475,7 +476,7 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt, int dis src_p = avs_get_read_ptr_p(frame, plane); pitch = avs_get_pitch_p(frame, plane); -#ifdef _WIN32 +#ifdef USING_AVISYNTH if (avs_library->avs_get_version(avs->clip) == 3) { rowsize = avs_get_row_size_p_25(frame, plane); planeheight = avs_get_height_p_25(frame, plane); |