[vlc-commits] direct3d11: use the video format from the region picture not the region format
Steve Lhomme
git at videolan.org
Fri Apr 13 12:45:36 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Apr 13 12:26:59 2018 +0200| [29f6b0c3e767a9149db0b1e7f01e63a0286c2ae9] | committer: Steve Lhomme
direct3d11: use the video format from the region picture not the region format
Fixes #20215
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29f6b0c3e767a9149db0b1e7f01e63a0286c2ae9
---
modules/video_output/win32/direct3d11.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index df8b012550..4fb1525aec 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -3093,8 +3093,8 @@ static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_co
if (cache != NULL && ((d3d_quad_t *) cache->p_sys)->picSys.texture[KNOWN_DXGI_INDEX]) {
ID3D11Texture2D_GetDesc( ((d3d_quad_t *) cache->p_sys)->picSys.texture[KNOWN_DXGI_INDEX], &texDesc );
if (texDesc.Format == sys->d3dregion_format->formatTexture &&
- texDesc.Width == r->fmt.i_visible_width &&
- texDesc.Height == r->fmt.i_visible_height) {
+ texDesc.Width == r->p_picture->format.i_width &&
+ texDesc.Height == r->p_picture->format.i_height) {
(*region)[i] = cache;
memset(&sys->d3dregions[j], 0, sizeof(cache)); // do not reuse this cached value
break;
@@ -3114,7 +3114,7 @@ static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_co
if (unlikely(d3dquad==NULL)) {
continue;
}
- if (AllocateTextures(VLC_OBJECT(vd), &sys->d3d_dev, sys->d3dregion_format, &r->fmt, 1, d3dquad->picSys.texture)) {
+ if (AllocateTextures(VLC_OBJECT(vd), &sys->d3d_dev, sys->d3dregion_format, &r->p_picture->format, 1, d3dquad->picSys.texture)) {
msg_Err(vd, "Failed to allocate %dx%d texture for OSD",
r->fmt.i_visible_width, r->fmt.i_visible_height);
for (int j=0; j<D3D11_MAX_SHADER_VIEW; j++)
@@ -3149,7 +3149,7 @@ static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_co
.p_sys = (picture_sys_t *) d3dquad,
.pf_destroy = DestroyPictureQuad,
};
- (*region)[i] = picture_NewFromResource(&r->fmt, &picres);
+ (*region)[i] = picture_NewFromResource(&r->p_picture->format, &picres);
if ((*region)[i] == NULL) {
msg_Err(vd, "Failed to create %dx%d picture for OSD",
r->fmt.i_width, r->fmt.i_height);
More information about the vlc-commits
mailing list