diff mbox series

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

Message ID 20221128044321.613550-1-haihao.xiang@intel.com
State New
Headers show
Series [FFmpeg-devel,v2,1/4] lavfi/qsvvpp: change the output frame's width and height | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Xiang, Haihao Nov. 28, 2022, 4:43 a.m. UTC
From: "Chen,Wenbin" <wenbin.chen@intel.com>

Make sure the size of the output frame always matches the agreed upon
image size.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
---
 libavfilter/qsvvpp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Xiang, Haihao Nov. 30, 2022, 1:59 a.m. UTC | #1
On Mon, 2022-11-28 at 12:43 +0800, Xiang, Haihao wrote:
> From: "Chen,Wenbin" <wenbin.chen@intel.com>
> 
> Make sure the size of the output frame always matches the agreed upon
> image size.
> 
> Signed-off-by: Wenbin Chen <wenbin.chen@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;

Will apply the patchset

-Haihao
diff mbox series

Patch

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;