changeset 224:8d1569be0ee1 libavformat

memory leak fix by (Tom Dexter <devel at www dot digitalaudiorock dot com>)
author michaelni
date Sun, 07 Sep 2003 09:26:39 +0000
parents 848b612d0595
children d0332f4362b6
files utils.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Sun Sep 07 00:37:46 2003 +0000
+++ b/utils.c	Sun Sep 07 09:26:39 2003 +0000
@@ -555,6 +555,7 @@
         if (!pktl) 
             break;
         s->packet_buffer = pktl->next;
+        av_free_packet(&pktl->pkt);
         av_free(pktl);
     }
 }
@@ -594,9 +595,9 @@
         if (pkt->pts != AV_NOPTS_VALUE) {
             if (st->start_time == AV_NOPTS_VALUE)
                 st->start_time = (int64_t)((double)pkt->pts * ic->pts_num * (double)AV_TIME_BASE / ic->pts_den);
-         }
-         av_free_packet(pkt);
-     }
+        }
+        av_free_packet(pkt);
+    }
 
     /* we compute the minimum start_time and use it as default */
     start_time = MAXINT64;