mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +00:00
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
This commit is contained in:
parent
a62546848e
commit
7df8a64b9d
@ -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!!!!
|
||||
|
Loading…
Reference in New Issue
Block a user