Original patch by Sang-Uok Kum. Signed-off-by: Tobias Diedrich Index: mplayer-patchset1/libmpdemux/muxer.c =================================================================== --- mplayer-patchset1.orig/libmpdemux/muxer.c 2010-12-21 21:03:16.199700000 +0100 +++ mplayer-patchset1/libmpdemux/muxer.c 2010-12-21 21:05:11.009615000 +0100 @@ -140,6 +140,8 @@ s->timer = buf->dts; s->buffer = buf->buffer; s->muxer->cont_write_chunk(s, buf->len, buf->flags, buf->dts, buf->pts); + free(buf->buffer); + buf->buffer = NULL; /* 3. restore saved timer and buffer */ s->timer = tmp_buf.dts; @@ -148,6 +150,7 @@ free(s->muxer->muxbuf); s->muxer->muxbuf_num = 0; + s->muxer->muxbuf = NULL; } }