]> git.sesse.net Git - ffmpeg/commitdiff
dshow: cleanup reference
authorrogerdpack <rogerpack2005@gmail.com>
Thu, 16 Aug 2012 16:42:46 +0000 (10:42 -0600)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 19 Aug 2012 16:30:50 +0000 (18:30 +0200)
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/dshow.c

index 93bca1d08dfdbc59c13f6ee19f7610a2c1da2746..3a2d6e1821ac641536420a240182e22e41ea87f9 100644 (file)
@@ -916,8 +916,8 @@ static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt)
     while (!pktl) {
         WaitForSingleObject(ctx->mutex, INFINITE);
         pktl = ctx->pktl;
-        if (ctx->pktl) {
-            *pkt = ctx->pktl->pkt;
+        if (pktl) {
+            *pkt = pktl->pkt;
             ctx->pktl = ctx->pktl->next;
             av_free(pktl);
         }