[Mplayer-cvslog] CVS: main/libmpdemux video.c,1.10,1.11
Atmosfear
atmos4 at mplayer.dev.hu
Wed Feb 20 23:45:03 CET 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv22701/libmpdemux
Modified Files:
video.c
Log Message:
Patch: Improved raw encoding support in mencoder by Fredrik Kuivinen
Index: video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/video.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- video.c 14 Feb 2002 22:15:53 -0000 1.10
+++ video.c 20 Feb 2002 22:45:00 -0000 1.11
@@ -19,6 +19,9 @@
#include "parse_es.h"
#include "mpeg_hdr.h"
+/* biCompression constant */
+#define BI_RGB 0L
+
static mp_mpeg_header_t picture;
int video_read_properties(sh_video_t *sh_video){
@@ -28,8 +31,18 @@
switch(d_video->demuxer->file_format){
case DEMUXER_TYPE_AVI:
case DEMUXER_TYPE_ASF: {
- // display info:
- sh_video->format=sh_video->bih->biCompression;
+ // display info:
+
+ if(sh_video->bih->biCompression == BI_RGB &&
+ (sh_video->video.fccHandler == mmioFOURCC('D', 'I', 'B', ' ') ||
+ sh_video->video.fccHandler == mmioFOURCC('R', 'G', 'B', ' ') ||
+ sh_video->video.fccHandler == mmioFOURCC('R', 'A', 'W', ' ') ||
+ sh_video->video.fccHandler == 0)) {
+ sh_video->format = mmioFOURCC(0, 'R', 'G', 'B') | sh_video->bih->biBitCount;
+ }
+ else
+ sh_video->format=sh_video->bih->biCompression;
+
sh_video->disp_w=sh_video->bih->biWidth;
sh_video->disp_h=abs(sh_video->bih->biHeight);
More information about the MPlayer-cvslog
mailing list