changeset 17779:031185213fa9

Missing free_demux_packet after read error
author reimar
date Wed, 08 Mar 2006 15:21:12 +0000
parents 37bfcf89c89c
children 16c347e53841
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Wed Mar 08 15:14:08 2006 +0000
+++ b/libmpdemux/demux_mpg.c	Wed Mar 08 15:21:12 2006 +0000
@@ -559,7 +559,10 @@
   pack = new_demux_packet(STREAM_BUFFER_SIZE);
   len = stream_read(demux->stream, pack->buffer, STREAM_BUFFER_SIZE);
   if (len <= 0)
+  {
+    free_demux_packet(pack);
     return 0;
+  }
   {
     register uint32_t state = (uint32_t)demux->priv;
     register int pos = -len;