[xiph-commits] r11443 - trunk/theora/examples

giles at svn.xiph.org giles at svn.xiph.org
Sat May 27 16:34:34 PDT 2006


Author: giles
Date: 2006-05-27 16:34:33 -0700 (Sat, 27 May 2006)
New Revision: 11443

Modified:
   trunk/theora/examples/encoder_example.c
Log:
Fix some signedness warnings.


Modified: trunk/theora/examples/encoder_example.c
===================================================================
--- trunk/theora/examples/encoder_example.c	2006-05-27 17:28:08 UTC (rev 11442)
+++ trunk/theora/examples/encoder_example.c	2006-05-27 23:34:33 UTC (rev 11443)
@@ -263,7 +263,7 @@
         fprintf(stderr,"Incorrect YUV input file version; YUV4MPEG2 required.\n");
       }
 
-      ret=sscanf(buffer,"MPEG2 W%d H%d F%d:%d I%c A%d:%d",
+      ret=sscanf((char *)buffer,"MPEG2 W%d H%d F%d:%d I%c A%d:%d",
                  &frame_x,&frame_y,&tmp_video_hzn,&tmp_video_hzd,&interlace,
                  &tmp_video_an,&tmp_video_ad);
       if(ret<7){
@@ -377,8 +377,8 @@
                             int videoflag){
   /* You'll go to Hell for using static variables */
   static int          state=-1;
-  static signed char *yuvframe[2];
-  signed char        *line;
+  static unsigned char *yuvframe[2];
+  unsigned char        *line;
   yuv_buffer          yuv;
   ogg_packet          op;
   int i, e;
@@ -496,7 +496,7 @@
       ogg_stream_packetin(to,&op);
 
       {
-        signed char *temp=yuvframe[0];
+        unsigned char *temp=yuvframe[0];
         yuvframe[0]=yuvframe[1];
         yuvframe[1]=temp;
         state--;



More information about the commits mailing list