changeset 31248:05f2b2395578

apply missing bits from http://repo.or.cz/w/mplayer.git/commitdiff/cd4e8dc1fa2863dcce62a44dd9ea105f9f9288f4
author siretart
date Thu, 03 Jun 2010 21:50:08 +0000
parents 5c77adfd862e
children 868e5c480af6
files libvo/vo_yuv4mpeg.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_yuv4mpeg.c	Thu Jun 03 21:01:37 2010 +0000
+++ b/libvo/vo_yuv4mpeg.c	Thu Jun 03 21:50:08 2010 +0000
@@ -149,6 +149,7 @@
 		return -1;
 	}
 
+#ifdef CONFIG_LIBSWSCALE_A
 	if(using_format != IMGFMT_YV12)
 	{
 		sws_rgb2rgb_init(get_sws_cpuflags());
@@ -160,6 +161,7 @@
 			return -1;
 		}
 	}
+#endif
 
 	write_bytes = image_width * image_height * 3 / 2;
 	image = malloc(write_bytes);
@@ -464,9 +466,11 @@
 		{
 			case IMGFMT_YV12:
 				return VFCAP_CSP_SUPPORTED|VFCAP_OSD|VFCAP_ACCEPT_STRIDE;
+#ifdef CONFIG_LIBSWSCALE_A
 			case IMGFMT_BGR|24:
 			case IMGFMT_RGB|24:
 				return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_OSD|VFCAP_ACCEPT_STRIDE;
+#endif
 		}
 	}
 	else
@@ -476,9 +480,11 @@
 		{
 			case IMGFMT_YV12:
 				return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_OSD|VFCAP_ACCEPT_STRIDE;
+#ifdef CONFIG_LIBSWSCALE_A
     		case IMGFMT_BGR|24:
     		case IMGFMT_RGB|24:
         		return VFCAP_CSP_SUPPORTED|VFCAP_OSD|VFCAP_ACCEPT_STRIDE;
+#endif
     	}
 	}
 	return 0;