summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-23 02:29:43 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-23 02:29:43 +0000
commitb9a54e20e376e641b12c994f45270abaae2e7b6c (patch)
tree1b972d059750ebb4cdf83c0ac7fb6e0b2baf1443
parentc39510ad6844635f9df031082ac4c83fe1217bcf (diff)
downloadxine-lib-b9a54e20e376e641b12c994f45270abaae2e7b6c.tar.gz
xine-lib-b9a54e20e376e641b12c994f45270abaae2e7b6c.tar.bz2
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
-rw-r--r--src/demuxers/demux_film.c7
1 files changed, 6 insertions, 1 deletions
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;
}