[vlc-devel] [PATCH] vout: we cannot reuse the decoder pool when the crop changes

Rémi Denis-Courmont remi at remlab.net
Thu Aug 18 14:19:26 CEST 2016


Le torstaina 18. elokuuta 2016, 12.40.41 EEST Steve Lhomme a écrit :
> If the crop values expand the pictures of the decoder pool would not be
> reallocated and keep an i_visible_lines that is not enough for the new crop
> area. Many filters will not copy more than the visible lines, starting with
> picture_Copy() used in ThreadDisplayRenderPicture().

In principles, crop is applied after filters, precisely so we can change it 
dynamically. Terminology is confusing here.

> Fixes #17602

That bug report does not exist yet.

> ---
>  src/video_output/video_output.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/src/video_output/video_output.c
> b/src/video_output/video_output.c index 7994bec..06fd0be 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -94,12 +94,17 @@ static int VoutValidateFormat(video_format_t *dst,
>      video_format_FixRgb(dst);
>      return VLC_SUCCESS;
>  }
> +static void VideoFormatCopyAr(video_format_t *dst,
> +                              const video_format_t *src)
> +{
> +    dst->i_sar_num = src->i_sar_num;
> +    dst->i_sar_den = src->i_sar_den;
> +}
>  static void VideoFormatCopyCropAr(video_format_t *dst,
>                                    const video_format_t *src)
>  {
>      video_format_CopyCrop(dst, src);
> -    dst->i_sar_num = src->i_sar_num;
> -    dst->i_sar_den = src->i_sar_den;
> +    VideoFormatCopyAr(dst, src);
>  }
>  static bool VideoFormatIsCropArEqual(video_format_t *dst,
>                                       const video_format_t *src)
> @@ -1417,8 +1422,8 @@ static int ThreadReinit(vout_thread_t *vout,
>          ThreadClean(vout);
>          return VLC_EGENERIC;
>      }
> -    /* We ignore crop/ar changes at this point, they are dynamically
> supported */ -    VideoFormatCopyCropAr(&vout->p->original, &original);
> +    /* We ignore ar changes at this point, they are dynamically supported
> */ +    VideoFormatCopyAr(&vout->p->original, &original);
>      if (video_format_IsSimilar(&original, &vout->p->original)) {
>          if (cfg->dpb_size <= vout->p->dpb_size) {
>              video_format_Clean(&original);


-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list