[FFmpeg-devel] [PATCH 1/4] lavfi/qsvvpp: change the output frame's width and height

Soft Works softworkz at hotmail.com
Thu Nov 24 20:57:02 EET 2022



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Xiang, Haihao
> Sent: Thursday, November 24, 2022 10:19 AM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Chen,Wenbin <wenbin.chen at intel.com>
> Subject: [FFmpeg-devel] [PATCH 1/4] lavfi/qsvvpp: change the output
> frame's width and height
> 
> From: "Chen,Wenbin" <wenbin.chen at intel.com>
> 
> Make sure the size of the output frame always matches the agreed upon
> image size.
> 
> Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
> ---
>  libavfilter/qsvvpp.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
> index 8428ee89ab..bf719b2a29 100644
> --- a/libavfilter/qsvvpp.c
> +++ b/libavfilter/qsvvpp.c
> @@ -487,15 +487,14 @@ static QSVFrame *query_frame(QSVVPPContext *s,
> AVFilterLink *outlink)
>          if (!out_frame->frame)
>              return NULL;
> 
> -        out_frame->frame->width  = outlink->w;
> -        out_frame->frame->height = outlink->h;
> -
>          ret = map_frame_to_surface(out_frame->frame,
>                                     &out_frame->surface);
>          if (ret < 0)
>              return NULL;
>      }
> 
> +    out_frame->frame->width  = outlink->w;
> +    out_frame->frame->height = outlink->h;
>      out_frame->surface.Info = s->vpp_param.vpp.Out;
> 
>      return out_frame;
> --

Which problem case does this address?

Thanks,
sw


More information about the ffmpeg-devel mailing list