Mercurial > mplayer.hg
changeset 15321:1568ad46dc78
Fix the memleak fix: in case of error, demux_close_ogg should be called
only once and demuxer->priv be freed.
author | reimar |
---|---|
date | Mon, 02 May 2005 07:59:12 +0000 |
parents | f743828642fd |
children | 74f6a75ee62d |
files | libmpdemux/demux_ogg.c |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_ogg.c Mon May 02 01:48:37 2005 +0000 +++ b/libmpdemux/demux_ogg.c Mon May 02 07:59:12 2005 +0000 @@ -756,6 +756,7 @@ clear_sub = -1; s = demuxer->stream; + demuxer->priv = ogg_d = (ogg_demuxer_t*)calloc(1,sizeof(ogg_demuxer_t)); sync = &ogg_d->sync; page = &ogg_d->page; @@ -1076,9 +1077,6 @@ goto err_out; } - /// Finish to setup the demuxer - demuxer->priv = ogg_d; - if(!n_video || (video_id < 0)) demuxer->video->id = -2; else @@ -1112,7 +1110,6 @@ return 1; err_out: - demux_close_ogg(demuxer); return 0; }