[MPlayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.45,1.46

Reimar Döffinger CVS syncmail at mplayerhq.hu
Thu Mar 9 23:14:36 CET 2006


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	demux_audio.c 
Log Message:
fix leak on read error (forgot to free demux packet)


Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- demux_audio.c	8 Mar 2006 13:07:36 -0000	1.45
+++ demux_audio.c	9 Mar 2006 22:14:34 -0000	1.46
@@ -422,7 +422,10 @@
 	dp = new_demux_packet(l);
 	memcpy(dp->buffer,hdr,4);
 	if (stream_read(s,dp->buffer + 4,l-4) != l-4)
+	{
+	  free_demux_packet(dp);
 	  return 0;
+	}
 	priv->last_pts = priv->last_pts < 0 ? 0 : priv->last_pts + sh_audio->audio.dwScale/(float)sh_audio->samplerate;
 	break;
       }




More information about the MPlayer-cvslog mailing list