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

Reimar Döffinger CVS syncmail at mplayerhq.hu
Fri Apr 14 16:10:07 CEST 2006


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	sdpplin.c 
Log Message:
missing free in case sdpplin_parse_stream returns invalid stream.


Index: sdpplin.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/realrtsp/sdpplin.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sdpplin.c	6 Jul 2005 21:37:38 -0000	1.5
+++ sdpplin.c	14 Apr 2006 14:10:04 -0000	1.6
@@ -238,7 +238,6 @@
 sdpplin_t *sdpplin_parse(char *data) {
 
   sdpplin_t        *desc=calloc(1,sizeof(sdpplin_t));
-  sdpplin_stream_t *stream;
   char             *buf=xbuffer_init(32);
   char             *decoded=xbuffer_init(32);
   int              handled;
@@ -249,14 +248,17 @@
     handled=0;
     
     if (filter(data, "m=", &buf)) {
-      stream=sdpplin_parse_stream(&data);
+      sdpplin_stream_t *stream=sdpplin_parse_stream(&data);
 #ifdef LOG
       printf("got data for stream id %u\n", stream->stream_id);
 #endif
       if (desc->stream && (stream->stream_id >= 0) && (stream->stream_id < desc->stream_count))
       desc->stream[stream->stream_id]=stream;
       else
+      {
       mp_msg(MSGT_OPEN, MSGL_ERR, "sdpplin: got 'm=', but 'a=StreamCount' is still unknown. Broken sdp?\n");
+      free(stream);
+      }
       continue;
     }
 




More information about the MPlayer-cvslog mailing list