summaryrefslogtreecommitdiff
path: root/libavdevice/dshow.c
diff options
context:
space:
mode:
authorrogerdpack <rogerpack2005@gmail.com>2012-08-16 10:42:46 -0600
committerMichael Niedermayer <michaelni@gmx.at>2012-08-19 18:30:50 +0200
commit42dbf06df0130456692fae8a008ddcebaa74d2e3 (patch)
treeb07b9c0d07dc5926c5aa6c75aca664e23ba29eef /libavdevice/dshow.c
parentc28d80f4c9360052943d2fdf708dd815cb1889d9 (diff)
dshow: cleanup reference
Signed-off-by: rogerdpack <rogerpack2005@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/dshow.c')
-rw-r--r--libavdevice/dshow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 93bca1d08d..3a2d6e1821 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -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);
}