diff utils.c @ 319:6285d395baf4 libavformat

fixed memory leak
author bellard
date Thu, 20 Nov 2003 11:22:25 +0000
parents 2833c2311b66
children c393ab803bcd
line wrap: on
line diff
--- a/utils.c	Wed Nov 19 02:34:40 2003 +0000
+++ b/utils.c	Thu Nov 20 11:22:25 2003 +0000
@@ -698,13 +698,11 @@
                     return 0;
                 }
             } else {
+                /* free packet */
+                av_free_packet(&s->cur_pkt); 
                 s->cur_st = NULL;
             }
         } else {
-            /* free previous packet */
-            if (s->cur_st && s->cur_st->parser)
-                av_free_packet(&s->cur_pkt); 
-
             /* read next packet */
             ret = av_read_packet(s, &s->cur_pkt);
             if (ret < 0)