[MPlayer-cvslog] CVS: main/libmpdemux demux_rawvideo.c,1.10,1.11

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Dec 18 12:57:28 CET 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv10096

Modified Files:
	demux_rawvideo.c 
Log Message:
calculate framesize for raw RGB and BGR.


Index: demux_rawvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rawvideo.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- demux_rawvideo.c	18 Nov 2005 14:39:19 -0000	1.10
+++ demux_rawvideo.c	18 Dec 2005 11:57:25 -0000	1.11
@@ -81,8 +81,14 @@
   case IMGFMT_UYVY: imgsize=width*height*2;break;
   case IMGFMT_Y8: imgsize=width*height;break;
   default:
+      if (IMGFMT_IS_RGB(format))
+        imgsize = width * height * ((IMGFMT_RGB_DEPTH(format) + 7) >> 3);
+      else if (IMGFMT_IS_BGR(format))
+        imgsize = width * height * ((IMGFMT_BGR_DEPTH(format) + 7) >> 3);
+      else {
       mp_msg(MSGT_DEMUX,MSGL_ERR,"rawvideo: img size not specified and unknown format!\n");
       return 0;
+      }
   }
 
   sh_video = new_sh_video(demuxer,0);




More information about the MPlayer-cvslog mailing list