diff options
author | Claudio Ciccani <klan@users.sourceforge.net> | 2006-10-07 09:59:49 +0000 |
---|---|---|
committer | Claudio Ciccani <klan@users.sourceforge.net> | 2006-10-07 09:59:49 +0000 |
commit | 5bdf86fed7df8f67a289c5dd819af8c242e66ccc (patch) | |
tree | c76361f28784e8210f6f1449b6695598eff7423c | |
parent | cadd287d2081f3b4d3b0ea322f7dc072f8d49314 (diff) | |
download | xine-lib-5bdf86fed7df8f67a289c5dd819af8c242e66ccc.tar.gz xine-lib-5bdf86fed7df8f67a289c5dd819af8c242e66ccc.tar.bz2 |
Fixed segfault in demux_asf_dispose().
CVS patchset: 8330
CVS date: 2006/10/07 09:59:49
-rw-r--r-- | src/demuxers/demux_asf.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 3e3f01bc5..92042c6bc 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_asf.c,v 1.184 2006/10/03 07:30:51 valtri Exp $ + * $Id: demux_asf.c,v 1.185 2006/10/07 09:59:49 klan Exp $ * * demultiplexer for asf streams * @@ -1708,21 +1708,23 @@ static int demux_asf_send_chunk (demux_plugin_t *this_gen) { static void demux_asf_dispose (demux_plugin_t *this_gen) { demux_asf_t *this = (demux_asf_t *) this_gen; - int i; - for (i=0; i<this->asf_header->stream_count; i++) { - asf_demux_stream_t *asf_stream; + if (this->asf_header) { + int i; + + for (i=0; i<this->asf_header->stream_count; i++) { + asf_demux_stream_t *asf_stream; - asf_stream = &this->streams[i]; - if( asf_stream->buffer ) { - free( asf_stream->buffer ); - asf_stream->buffer = NULL; + asf_stream = &this->streams[i]; + if (asf_stream->buffer) { + free (asf_stream->buffer); + asf_stream->buffer = NULL; + } } - } - - if (this->asf_header) - asf_header_delete(this->asf_header); + asf_header_delete (this->asf_header); + } + free (this); } |