it.
Set ppMediaType to NULL when returning S_FALSE in
IMediaSample_GetMediaType (required by native Quartz dll).
Added support for 32-bit depth source in video renderer.
goto error;
}
- return S_OK;
-
error:
- /* If we have a sample that has not been delivered, release it */
if (pSample)
IMediaSample_Release(pSample);
AVIDec_SendSampleData(This, pbSrcStream, cbSrcStream);
- /* We have finished with the incoming sample, we must release it now */
- IMediaSample_Release(pSample);
-
return S_OK;
}
ERR("Error sending sample (%lx)\n", hr);
}
- /* If we have a sample that has not been delivered, release it */
- if (FAILED(hr) && This->pCurrentSample)
+ if (This->pCurrentSample)
IMediaSample_Release(This->pCurrentSample);
This->pCurrentSample = NULL;
ERR("Unable to lock sound buffer !\n");
break;
}
- TRACE("write_pos=%ld, size=%ld, sz1=%ld, sz2=%ld\n", This->write_pos, size2, dwsize1, dwsize2);
+ /* TRACE("write_pos=%ld, size=%ld, sz1=%ld, sz2=%ld\n", This->write_pos, size2, dwsize1, dwsize2); */
memcpy(lpbuf1, data, dwsize1);
if (dwsize2) {
}
}
DSoundRender_SendSampleData(This, pbSrcStream, cbSrcStream);
-
- /* We have finished with the incoming sample, we must release it now */
- IMediaSample_Release(pSample);
return S_OK;
}
{
BaseMemAllocator *This = (BaseMemAllocator *)iface;
- TRACE("()\n");
+ TRACE("(%p)->() AddRef from %ld\n", iface, This->ref);
return InterlockedIncrement(&This->ref);
}
{
BaseMemAllocator *This = (BaseMemAllocator *)iface;
- TRACE("()\n");
+ TRACE("(%p)->() Release from %ld\n", iface, This->ref);
if (!InterlockedDecrement(&This->ref))
{
TRACE("(%p)\n", ppMediaType);
- if (!This->props.pMediaType)
+ if (!This->props.pMediaType) {
+ /* Make sure we return a NULL pointer (required by native Quartz dll) */
+ if (ppMediaType)
+ *ppMediaType = NULL;
return S_FALSE;
+ }
if (!(*ppMediaType = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE))))
return E_OUTOFMEMORY;
*(ptr + i*psz + 3 + j * sdesc.u1.lPitch) = 0xFF;
}
}
+ else if (format->bmiHeader.biBitCount == 32)
+ {
+ int psz = sdesc.ddpfPixelFormat.u1.dwRGBBitCount == 32 ? 4 : 3;
+ for (j = 0; j < height; j++)
+ for (i = 0; i < width; i++)
+ {
+ *(ptr + i*psz + 0 + j * sdesc.u1.lPitch) = *(data + (i + 0 + (height-1-j) * width)*4 + 0);
+ *(ptr + i*psz + 1 + j * sdesc.u1.lPitch) = *(data + (i + 0 + (height-1-j) * width)*4 + 1);
+ *(ptr + i*psz + 2 + j * sdesc.u1.lPitch) = *(data + (i + 0 + (height-1-j) * width)*4 + 2);
+ if (psz == 4)
+ *(ptr + i*psz + 3 + j * sdesc.u1.lPitch) = 0xFF;
+ }
+ }
else
- FIXME("Source size with a depths other than paletted 8 bits are not yet supported\n");
+ FIXME("Source size with a depths other than paletted 8 or 32 bits are not yet supported\n");
}
else
FIXME("Destination depths with a depth other than 24 or 32 bits are not yet supported\n");
VideoRenderer_SendSampleData(This, pbSrcStream, cbSrcStream);
- /* We have finished with the incoming sample, we must release it now */
- IMediaSample_Release(pSample);
-
return S_OK;
}