Browse Source

nvdec: tex_alignment must be > 0

Since this variable is a denominator in the next calculation.
pull/193/head
Thomas Guillem 8 months ago
committed by Jean-Baptiste Kempf
parent
commit
edd376abdb
  1. 2
      modules/hw/nvdec/nvdec.c

2
modules/hw/nvdec/nvdec.c

@ -334,7 +334,7 @@ static int CUDAAPI HandleVideoSequence(void *p_opaque, CUVIDEOFORMAT *p_format)
goto cuda_error;
ret = CALL_CUDA_DEC(cuDeviceGetAttribute, &tex_alignment, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, cuDev);
if (ret != VLC_SUCCESS || tex_alignment < 0)
if (ret != VLC_SUCCESS || tex_alignment <= 0)
goto cuda_error;
unsigned int bytes_per_sample = i_bpp > 8 ? 2 : 1;

Loading…
Cancel
Save