# HG changeset patch # User siretart # Date 1275586678 0 # Node ID 952d773404f5eb37385ea8af5a7480c208d63bb0 # Parent ceeed64abf5a75fc90b314aec47dfca3843363ee vo_yuv4mpeg: disable RGB support when compiling against a shared libswscale This avoids using swscale internals when compiling against a shared libswscale. Patch inspired by Uoti Urpala's work in his git branch: http://repo.or.cz/w/mplayer.git/commitdiff/cd4e8dc1fa2863dcce62a44dd9ea105f9f9288f4 diff -r ceeed64abf5a -r 952d773404f5 libvo/vo_yuv4mpeg.c --- a/libvo/vo_yuv4mpeg.c Thu Jun 03 08:17:51 2010 +0000 +++ b/libvo/vo_yuv4mpeg.c Thu Jun 03 17:37:58 2010 +0000 @@ -56,7 +56,9 @@ #include "fastmemcpy.h" #include "libswscale/swscale.h" +#ifdef CONFIG_LIBSWSCALE_A #include "libswscale/rgb2rgb.h" +#endif #include "libmpcodecs/vf_scale.h" #include "libavutil/rational.h" @@ -228,6 +230,7 @@ vo_draw_text(image_width, image_height, draw_alpha); } +#ifdef CONFIG_LIBSWSCALE_A static void deinterleave_fields(uint8_t *ptr, const int stride, const int img_height) { @@ -258,6 +261,7 @@ } free(line_state); } +#endif static void vo_y4m_write(const void *ptr, const size_t num_bytes) { @@ -318,14 +322,15 @@ static void flip_page (void) { - uint8_t *upper_y, *upper_u, *upper_v, *rgb_buffer_lower; - int rgb_stride, uv_stride, field_height; - unsigned int i, low_ofs; - fprintf(yuv_out, "FRAME\n"); +#ifdef CONFIG_LIBSWSCALE_A if (using_format != IMGFMT_YV12) { + uint8_t *upper_y, *upper_u, *upper_v, *rgb_buffer_lower; + int rgb_stride, uv_stride, field_height; + unsigned int i, low_ofs; + rgb_stride = image_width * 3; uv_stride = image_width / 2; @@ -374,6 +379,7 @@ image_width, image_height, image_width, uv_stride, rgb_stride); } +#endif /* Write progressive frame */ vo_y4m_write(image, write_bytes);