[vlc-devel] [PATCH 1/6] decoder: allow the buffer_new from the decoder to be NULL

Thomas Guillem thomas at gllm.fr
Tue Jun 25 13:56:49 CEST 2019


OK for the set.

On Tue, Jun 25, 2019, at 13:54, Steve Lhomme wrote:
> Create a picture_t on the fly by default.
> ---
>  src/input/decoder_helpers.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
> index 1c4593db30..7384e2bda0 100644
> --- a/src/input/decoder_helpers.c
> +++ b/src/input/decoder_helpers.c
> @@ -88,6 +88,8 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
>  picture_t *decoder_NewPicture( decoder_t *dec )
>  {
>      vlc_assert( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs != NULL );
> +    if (dec->cbs->video.buffer_new == NULL)
> +        return picture_NewFromFormat( &dec->fmt_out.video );
>      return dec->cbs->video.buffer_new( 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