Mercurial > mplayer.hg
diff mencoder.c @ 32795:801dc49c6f33
Fix muxer memory leak.
This adds the missing free() and moves the flushing logic into a
seperate function, which we then also call from mencoder to make
really sure everything has been flushed.
Original patch by Sang-Uok Kum.
Signed-off-by: Tobias Diedrich <ranma@google.com>
author | ranma |
---|---|
date | Thu, 10 Feb 2011 21:31:24 +0000 |
parents | 06b75ec1b9c9 |
children | 674117ab7ce7 |
line wrap: on
line diff
--- a/mencoder.c Thu Feb 10 21:25:38 2011 +0000 +++ b/mencoder.c Thu Feb 10 21:31:24 2011 +0000 @@ -1670,6 +1670,9 @@ if(aencoder->fixup) aencoder->fixup(aencoder); +/* flush muxer just in case, this is a no-op unless + * we created a stream but never wrote frames to it... */ +muxer_flush(muxer); if (muxer->cont_write_index) muxer_write_index(muxer); muxer_f_size=stream_tell(muxer->stream); stream_seek(muxer->stream,0);