From b9a54e20e376e641b12c994f45270abaae2e7b6c Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Mon, 23 Dec 2002 02:29:43 +0000 Subject: not freeing allocated buffers is a bad bad thing: it makes xine freeze on shutdown while trying to dispose the used memory. i would like to ask Mike and all demuxer writters to double check this, and free buffers on error conditions... thanks! ;) CVS patchset: 3643 CVS date: 2002/12/23 02:29:43 --- src/demuxers/demux_film.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index 200db25fc..7f0a393f1 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -21,7 +21,7 @@ * For more information on the FILM file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_film.c,v 1.47 2002/12/21 12:56:45 miguelfreitas Exp $ + * $Id: demux_film.c,v 1.48 2002/12/23 02:29:43 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -356,6 +356,7 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { if (!fixed_cvid_header) { if (this->input->read(this->input, buf->content, 10) != 10) { + buf->free_buffer(buf); this->status = DEMUX_FINISHED; break; } @@ -367,6 +368,7 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { /* load the rest of the chunk */ if (this->input->read(this->input, buf->content + 10, buf->size - 10) != buf->size - 10) { + buf->free_buffer(buf); this->status = DEMUX_FINISHED; break; } @@ -380,6 +382,7 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { } else { if (this->input->read(this->input, buf->content, buf->size) != buf->size) { + buf->free_buffer(buf); this->status = DEMUX_FINISHED; break; } @@ -432,6 +435,7 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { if (this->input->read(this->input, buf->content, buf->size) != buf->size) { + buf->free_buffer(buf); this->status = DEMUX_FINISHED; break; } @@ -465,6 +469,7 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { if (this->input->read(this->input, buf->content, buf->size) != buf->size) { + buf->free_buffer(buf); this->status = DEMUX_FINISHED; break; } -- cgit v1.2.3