# HG changeset patch # User reimar # Date 1351717119 0 # Node ID 1e56eab1f210a0abc8f0356df95568cfa4ad9ce0 # Parent b4d9b416a8f1b10032d91908f8596763b37ed2c1 Remove another incorrect use of realloc_struct. diff -r b4d9b416a8f1 -r 1e56eab1f210 libmpdemux/muxer.c --- a/libmpdemux/muxer.c Wed Oct 31 20:56:41 2012 +0000 +++ b/libmpdemux/muxer.c Wed Oct 31 20:58:39 2012 +0000 @@ -132,14 +132,14 @@ } else { int num = s->muxer->muxbuf_num++; - muxbuf_t *buf, *tmp; + muxbuf_t *buf; - tmp = realloc_struct(s->muxer->muxbuf, (num+1), sizeof(muxbuf_t)); - if(!tmp) { + s->muxer->muxbuf = realloc_struct(s->muxer->muxbuf, (num+1), sizeof(muxbuf_t)); + if(!s->muxer->muxbuf) { + s->muxer->muxbuf_num = 0; mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufReallocErr); return; } - s->muxer->muxbuf = tmp; buf = s->muxer->muxbuf + num; /* buffer this frame */