1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

dshow: protect access to curbufsize

Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
rogerdpack
2012-08-16 10:43:40 -06:00
committed by Michael Niedermayer
parent 42dbf06df0
commit a93c221ccd

View File

@@ -920,6 +920,7 @@ static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt)
*pkt = pktl->pkt; *pkt = pktl->pkt;
ctx->pktl = ctx->pktl->next; ctx->pktl = ctx->pktl->next;
av_free(pktl); av_free(pktl);
ctx->curbufsize -= pkt->size;
} }
ResetEvent(ctx->event); ResetEvent(ctx->event);
ReleaseMutex(ctx->mutex); ReleaseMutex(ctx->mutex);
@@ -932,8 +933,6 @@ static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt)
} }
} }
ctx->curbufsize -= pkt->size;
return pkt->size; return pkt->size;
} }