Mercurial > mplayer.hg
changeset 17790:99a2481164ac
fix leak on read error (forgot to free demux packet)
author | reimar |
---|---|
date | Thu, 09 Mar 2006 22:14:34 +0000 |
parents | 9f0c42967ce5 |
children | 3c73573843e2 |
files | libmpdemux/demux_audio.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c Thu Mar 09 22:11:39 2006 +0000 +++ b/libmpdemux/demux_audio.c Thu Mar 09 22:14:34 2006 +0000 @@ -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; }