[MPlayer-cvslog] CVS: main/libmpdemux/realrtsp sdpplin.c,1.4,1.5

Roberto Togni CVS syncmail at mplayerhq.hu
Wed Jul 6 23:37:41 CEST 2005


CVS change done by Roberto Togni CVS

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

Modified Files:
	sdpplin.c 
Log Message:
Revert fix v1.3, it breaks streams with cook audio (ex. 
rtsp://mm4.rai.it/raitre/blob/ultimo/blob.rm)
Applied a different fix for the first buf[k] (ensure buf size is k+4)
The second buf[k] is safe, buf is at least 32 when the code is called


Index: sdpplin.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/realrtsp/sdpplin.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sdpplin.c	6 Jul 2005 19:20:16 -0000	1.4
+++ sdpplin.c	6 Jul 2005 21:37:38 -0000	1.5
@@ -80,18 +80,18 @@
       a[i] = (char) c;
       b[i] = (char) dtable[c];
     }
-    out = xbuffer_ensure_size(out, k+3);
+    out = xbuffer_ensure_size(out, k+4);
     out[k++] = (b[0] << 2) | (b[1] >> 4);
     out[k++] = (b[1] << 4) | (b[2] >> 2);
     out[k++] = (b[2] << 6) | b[3];
     i = a[2] == '=' ? 1 : (a[3] == '=' ? 2 : 3);
     if (i < 3) {
-      out[k - 1]=0;
+      out[k]=0;
       *size=k;
       return out;
     }
   }
-  out[k - 1]=0;
+  out[k]=0;
   *size=k;
   return out;
 }




More information about the MPlayer-cvslog mailing list