changeset 35225:1e56eab1f210

Remove another incorrect use of realloc_struct.
author reimar
date Wed, 31 Oct 2012 20:58:39 +0000
parents b4d9b416a8f1
children 584d7c20aca4
files libmpdemux/muxer.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 */