[FFmpeg-devel] [PATCH 2/2] Free allocated packet before returning from av_read_frame_internal.

Jai Menon jmenon86
Wed Jul 14 23:05:45 CEST 2010


---
 libavformat/utils.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6fa4dff..bbe6a64 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1118,6 +1118,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
                             goto got_packet;
                     }
                 }
+                av_free_packet(&cur_pkt);
                 /* no more packets: really terminate parsing */
                 return ret;
             }
-- 
1.7.1.1




More information about the ffmpeg-devel mailing list