summaryrefslogtreecommitdiffstats
path: root/dll_init.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-17 19:23:47 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-17 19:23:47 +0000
commit7df8a64b9d2a3783b57346caa40897899652407d (patch)
treea90c98705d72b25ee032703d0c0b0a29a081ce56 /dll_init.c
parenta62546848ee735eb0250a4b39e6421aa7b48c6eb (diff)
downloadmpv-7df8a64b9d2a3783b57346caa40897899652407d.tar.bz2
mpv-7df8a64b9d2a3783b57346caa40897899652407d.tar.xz
BGR modes with VfW codecs fixed - biCompression must be 0 for BGR...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@490 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dll_init.c')
-rw-r--r--dll_init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dll_init.c b/dll_init.c
index 464cb81efc..3ab1b0c037 100644
--- a/dll_init.c
+++ b/dll_init.c
@@ -102,6 +102,7 @@ int acm_decode_audio(sh_audio_t *sh_audio, void* a_buffer,int len){
int init_video_codec(){
HRESULT ret;
+ int yuv=0;
unsigned int outfmt=sh_video->codec->outfmt[sh_video->outfmtidx];
if(verbose) printf("======= Win32 (VFW) VIDEO Codec init =======\n");
@@ -146,6 +147,7 @@ int init_video_codec(){
case IMGFMT_I420:
case IMGFMT_IYUV:
sh_video->o_bih.biBitCount=12;
+ yuv=1;
break;
/* packed format */
@@ -153,6 +155,7 @@ int init_video_codec(){
case IMGFMT_UYVY:
case IMGFMT_YVYU:
sh_video->o_bih.biBitCount=16;
+ yuv=1;
break;
/* rgb/bgr format */
@@ -189,7 +192,7 @@ int init_video_codec(){
sh_video->o_bih.biHeight=-sh_video->bih->biHeight; // flip image!
}
- if(!(sh_video->codec->outflags[sh_video->outfmtidx] & CODECS_FLAG_YUVHACK))
+ if(yuv && !(sh_video->codec->outflags[sh_video->outfmtidx] & CODECS_FLAG_YUVHACK))
sh_video->o_bih.biCompression = outfmt;
if(verbose) {
@@ -244,7 +247,7 @@ int init_video_codec(){
return 0;
}
- if(sh_video->codec->outflags[sh_video->outfmtidx] & CODECS_FLAG_YUVHACK)
+ if(yuv && sh_video->codec->outflags[sh_video->outfmtidx] & CODECS_FLAG_YUVHACK)
sh_video->o_bih.biCompression = outfmt;
// avi_header.our_in_buffer=malloc(avi_header.video.dwSuggestedBufferSize); // FIXME!!!!