[vlc-devel] [PATCH 11/11] decoder: make the get_device callback mandatory

Thomas Guillem thomas at gllm.fr
Tue Nov 5 14:56:46 CET 2019



On Mon, Nov 4, 2019, at 13:05, Steve Lhomme wrote:
> Even if it gives a NULL decoder device at least we tried.
> ---
>  include/vlc_codec.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/include/vlc_codec.h b/include/vlc_codec.h
> index e73ad16f393..274de068014 100644
> --- a/include/vlc_codec.h
> +++ b/include/vlc_codec.h
> @@ -279,9 +279,6 @@ static inline vlc_decoder_device * 
> decoder_GetDecoderDevice( decoder_t *dec )
>      if ( unlikely(dec->fmt_in.i_cat != VIDEO_ES || dec->cbs == NULL ) )
>          return NULL;
>  
> -    if ( dec->cbs->video.get_device == NULL )
> -        return NULL; /* TODO make it mandatory for all decoder owners */

You should add an assert then.

> -
>      return dec->cbs->video.get_device( dec );
>  }
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list