Browse Source

dshow: protect access to curbufsize

Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
rogerdpack Michael Niedermayer 13 years ago
parent
commit
a93c221ccd
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavdevice/dshow.c

+ 1
- 2
libavdevice/dshow.c View File

@@ -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;
}



Loading…
Cancel
Save