提交 f3494647 编写于 作者: A Alexander Alekhin

Merge pull request #6762 from maff91:master

......@@ -2447,13 +2447,15 @@ static bool setSizeAndSubtype(videoDevice * VD, int attemptWidth, int attemptHei
VD->pAmMediaType->subtype = mediatype;
//buffer size
if (mediatype == MEDIASUBTYPE_RGB24)
{
VD->pAmMediaType->lSampleSize = attemptWidth*attemptHeight*3;
if (mediatype == MEDIASUBTYPE_RGB24){
VD->pAmMediaType->lSampleSize = attemptWidth*attemptHeight * 3;
}
else
{
// For compressed data, the value can be zero.
else if ((mediatype == MEDIASUBTYPE_YUY2) || (mediatype == MEDIASUBTYPE_YVYU) ||
(mediatype == MEDIASUBTYPE_UYVY)){
VD->pAmMediaType->lSampleSize = attemptWidth*attemptHeight * 2;
}
else{
VD->pAmMediaType->lSampleSize = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册