[FFmpeg-cvslog] r22575 - trunk/libavdevice/vfwcap.c
ramiro
subversion
Wed Mar 17 05:36:07 CET 2010
Author: ramiro
Date: Wed Mar 17 05:36:06 2010
New Revision: 22575
Log:
vfwcap: Free remaining packets on vfw_read_close().
Modified:
trunk/libavdevice/vfwcap.c
Modified: trunk/libavdevice/vfwcap.c
==============================================================================
--- trunk/libavdevice/vfwcap.c Wed Mar 17 05:24:43 2010 (r22574)
+++ trunk/libavdevice/vfwcap.c Wed Mar 17 05:36:06 2010 (r22575)
@@ -210,6 +210,7 @@ fail:
static int vfw_read_close(AVFormatContext *s)
{
struct vfw_ctx *ctx = s->priv_data;
+ AVPacketList *pktl;
if(ctx->hwnd) {
SendMessage(ctx->hwnd, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0);
@@ -221,6 +222,14 @@ static int vfw_read_close(AVFormatContex
if(ctx->event)
CloseHandle(ctx->event);
+ pktl = ctx->pktl;
+ while (pktl) {
+ AVPacketList *next = pktl->next;
+ av_destruct_packet(&pktl->pkt);
+ av_free(pktl);
+ pktl = next;
+ }
+
return 0;
}
More information about the ffmpeg-cvslog
mailing list