[vlc-commits] direct3d11: use the video format from the region picture not the region format
Steve Lhomme
git at videolan.org
Fri Apr 13 13:01:24 CEST 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Apr 13 12:26:59 2018 +0200| [75223c49e75e9460b35c277b177779388646823c] | committer: Hugo Beauzée-Luyssen
direct3d11: use the video format from the region picture not the region format
Fixes #20215
(cherry picked from commit 29f6b0c3e767a9149db0b1e7f01e63a0286c2ae9)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=75223c49e75e9460b35c277b177779388646823c
---
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 49c2bc048b..d5b7b25b99 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -3090,8 +3090,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;
@@ -3111,7 +3111,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++)
@@ -3146,7 +3146,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