[FFmpeg-cvslog] dshow: protect access to curbufsize
rogerdpack
git at videolan.org
Sun Aug 19 18:41:49 CEST 2012
ffmpeg | branch: master | rogerdpack <rogerpack2005 at gmail.com> | Thu Aug 16 10:43:40 2012 -0600| [a93c221ccd7a036de052e79659fe5b082f586279] | committer: Michael Niedermayer
dshow: protect access to curbufsize
Signed-off-by: rogerdpack <rogerpack2005 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a93c221ccd7a036de052e79659fe5b082f586279
---
libavdevice/dshow.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 3a2d6e1..ac207b8 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -920,6 +920,7 @@ static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt)
*pkt = pktl->pkt;
ctx->pktl = ctx->pktl->next;
av_free(pktl);
+ ctx->curbufsize -= pkt->size;
}
ResetEvent(ctx->event);
ReleaseMutex(ctx->mutex);
@@ -932,8 +933,6 @@ static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt)
}
}
- ctx->curbufsize -= pkt->size;
-
return pkt->size;
}
More information about the ffmpeg-cvslog
mailing list