[vlc-commits] [Git][videolan/vlc][master] 3 commits: hw:d3d11 fix the decoder_UpdateVideoOutput() output value check
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu May 12 08:47:01 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
1186ad17 by Steve Lhomme at 2022-05-12T08:32:24+00:00
hw:d3d11 fix the decoder_UpdateVideoOutput() output value check
It returns 0 or -1, not a VLC_xxx error message.
- - - - -
a4c1cefd by Steve Lhomme at 2022-05-12T08:32:24+00:00
nvdec: fix the decoder_UpdateVideoOutput() output value check
It returns 0 or -1, not a VLC_xxx error message.
- - - - -
caf41ce2 by Steve Lhomme at 2022-05-12T08:32:24+00:00
test: video_output: fix the decoder_UpdateVideoOutput() output value check
It returns 0 or -1, not a VLC_xxx error message.
- - - - -
3 changed files:
- modules/hw/d3d11/d3d11_decoder.cpp
- modules/hw/nvdec/nvdec.c
- test/src/video_output/video_output_scenarios.c
Changes:
=====================================
modules/hw/d3d11/d3d11_decoder.cpp
=====================================
@@ -137,7 +137,7 @@ static int DecodeFrame( decoder_t *p_dec, block_t *p_block )
return VLC_EGENERIC;
}
- if( decoder_UpdateVideoOutput( p_dec, p_sys->vctx ) != VLC_SUCCESS )
+ if( decoder_UpdateVideoOutput( p_dec, p_sys->vctx ) )
{
block_Release( p_block );
return VLCDEC_SUCCESS;
@@ -284,7 +284,7 @@ int D3D11OpenBlockDecoder( vlc_object_t *obj )
return VLC_EGENERIC;
}
- if( decoder_UpdateVideoOutput( p_dec, p_sys->vctx ) != VLC_SUCCESS )
+ if( decoder_UpdateVideoOutput( p_dec, p_sys->vctx ) )
{
vlc_video_context_Release(p_sys->vctx);
vlc_decoder_device_Release(dec_dev);
=====================================
modules/hw/nvdec/nvdec.c
=====================================
@@ -397,7 +397,7 @@ static int CUDAAPI HandleVideoSequence(void *p_opaque, CUVIDEOFORMAT *p_format)
CALL_CUDA_DEC(cuCtxPopCurrent, NULL);
ret = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out);
- return (ret == VLC_SUCCESS) ? i_nb_surface : 0;
+ return (ret == 0) ? i_nb_surface : 0;
cuda_error:
CALL_CUDA_DEC(cuCtxPopCurrent, NULL);
@@ -995,18 +995,19 @@ static int OpenDecoder(vlc_object_t *p_this)
output_chromas[chroma_idx++] = MapSurfaceChroma(cudaChroma, i_depth_luma);
output_chromas[chroma_idx++] = 0;
+ result = -1;
for (chroma_idx = 0; output_chromas[chroma_idx] != 0; chroma_idx++)
{
p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma = output_chromas[chroma_idx];
result = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out);
- if (result == VLC_SUCCESS)
+ if (result == 0)
{
msg_Dbg(p_dec, "using chroma %4.4s", (char*)&p_dec->fmt_out.video.i_chroma);
break;
}
msg_Warn(p_dec, "Failed to use output chroma %4.4s", (char*)&p_dec->fmt_out.video.i_chroma);
}
- if (result != VLC_SUCCESS)
+ if (result != 0)
goto error;
int deinterlace_mode = var_InheritInteger(p_dec, "nvdec-deint");
=====================================
test/src/video_output/video_output_scenarios.c
=====================================
@@ -92,7 +92,7 @@ static void decoder_decode_change_chroma(decoder_t *dec, block_t *block)
= chroma_list[index];
int ret = decoder_UpdateVideoOutput(dec, NULL);
- if (ret != VLC_SUCCESS)
+ if (ret != 0)
{
scenario_data.test_finished = true;
vlc_sem_post(&scenario_data.wait_stop);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/03467da9219340ddb6b55485118d61ab51715d4e...caf41ce2440bcf833a0c583cf93830d5e92139e6
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/03467da9219340ddb6b55485118d61ab51715d4e...caf41ce2440bcf833a0c583cf93830d5e92139e6
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list