vlc | branch: master | Steve Lhomme <[email protected]> | Thu Jan 19 11:10:47 2017 +0100| [d65c6a93d673e7806f480c048b3ec2676b63e4a9] | committer: Jean-Baptiste Kempf
d3d11va: workaround for Xbox decoder limitations Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d65c6a93d673e7806f480c048b3ec2676b63e4a9 --- modules/codec/avcodec/d3d11va.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c index deed0e7..9edbffb 100644 --- a/modules/codec/avcodec/d3d11va.c +++ b/modules/codec/avcodec/d3d11va.c @@ -952,6 +952,19 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id, const video_forma ID3D10Multithread_Release(pMultithread); } +#if VLC_WINSTORE_APP + /* On the Xbox 1/S, any decoding of H264 with one dimension over 2304 + * crashes totally the device */ + if (codec_id == AV_CODEC_ID_H264 && + (dx_sys->surface_width > 2304 || dx_sys->surface_height > 2304) && + isXboxHardware((ID3D11Device*) dx_sys->d3ddev)) + { + msg_Warn(va, "%dx%d resolution not supported by your hardware", dx_sys->surface_width, dx_sys->surface_height); + dx_sys->surface_count = 0; + return VLC_EGENERIC; + } +#endif + D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc; ZeroMemory(&viewDesc, sizeof(viewDesc)); viewDesc.DecodeProfile = dx_sys->input; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
