mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
winegstreamer: Set bmiHeader.biSizeImage in the transform filter.
This commit is contained in:
parent
9ef59aad98
commit
9526499b88
1 changed files with 5 additions and 3 deletions
|
@ -627,7 +627,7 @@ static HRESULT WINAPI Gstreamer_YUV_SetMediaType(TransformFilter *tf, PIN_DIRECT
|
||||||
AM_MEDIA_TYPE *outpmt = &This->tf.pmt;
|
AM_MEDIA_TYPE *outpmt = &This->tf.pmt;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
int avgtime;
|
int avgtime;
|
||||||
DWORD width, height;
|
LONG width, height;
|
||||||
|
|
||||||
if (dir != PINDIR_INPUT)
|
if (dir != PINDIR_INPUT)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
@ -643,19 +643,21 @@ static HRESULT WINAPI Gstreamer_YUV_SetMediaType(TransformFilter *tf, PIN_DIRECT
|
||||||
avgtime = vih->AvgTimePerFrame;
|
avgtime = vih->AvgTimePerFrame;
|
||||||
width = vih->bmiHeader.biWidth;
|
width = vih->bmiHeader.biWidth;
|
||||||
height = vih->bmiHeader.biHeight;
|
height = vih->bmiHeader.biHeight;
|
||||||
if ((LONG)vih->bmiHeader.biHeight > 0)
|
if (vih->bmiHeader.biHeight > 0)
|
||||||
vih->bmiHeader.biHeight = -vih->bmiHeader.biHeight;
|
vih->bmiHeader.biHeight = -vih->bmiHeader.biHeight;
|
||||||
vih->bmiHeader.biBitCount = 24;
|
vih->bmiHeader.biBitCount = 24;
|
||||||
vih->bmiHeader.biCompression = BI_RGB;
|
vih->bmiHeader.biCompression = BI_RGB;
|
||||||
|
vih->bmiHeader.biSizeImage = width * abs(height) * 3;
|
||||||
} else {
|
} else {
|
||||||
VIDEOINFOHEADER2 *vih = (VIDEOINFOHEADER2*)outpmt->pbFormat;
|
VIDEOINFOHEADER2 *vih = (VIDEOINFOHEADER2*)outpmt->pbFormat;
|
||||||
avgtime = vih->AvgTimePerFrame;
|
avgtime = vih->AvgTimePerFrame;
|
||||||
width = vih->bmiHeader.biWidth;
|
width = vih->bmiHeader.biWidth;
|
||||||
height = vih->bmiHeader.biHeight;
|
height = vih->bmiHeader.biHeight;
|
||||||
if ((LONG)vih->bmiHeader.biHeight > 0)
|
if (vih->bmiHeader.biHeight > 0)
|
||||||
vih->bmiHeader.biHeight = -vih->bmiHeader.biHeight;
|
vih->bmiHeader.biHeight = -vih->bmiHeader.biHeight;
|
||||||
vih->bmiHeader.biBitCount = 24;
|
vih->bmiHeader.biBitCount = 24;
|
||||||
vih->bmiHeader.biCompression = BI_RGB;
|
vih->bmiHeader.biCompression = BI_RGB;
|
||||||
|
vih->bmiHeader.biSizeImage = width * abs(height) * 3;
|
||||||
}
|
}
|
||||||
if (!avgtime)
|
if (!avgtime)
|
||||||
avgtime = 10000000 / 30;
|
avgtime = 10000000 / 30;
|
||||||
|
|
Loading…
Reference in a new issue