Commit a93c221c authored by rogerdpack's avatar rogerdpack Committed by Michael Niedermayer

dshow: protect access to curbufsize

Signed-off-by: 's avatarrogerdpack <rogerpack2005@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 42dbf06d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment