diff mbox series

[FFmpeg-devel] lavfi/cas: fix the wrong source linesize

Message ID 20210411145349.3068-1-zhongli_dev@126.com
State New
Headers show
Series [FFmpeg-devel] lavfi/cas: fix the wrong source linesize | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Zhong Li April 11, 2021, 2:53 p.m. UTC
Signed-off-by: Zhong Li <zhongli_dev@126.com>
---
 libavfilter/vf_cas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol April 11, 2021, 3:25 p.m. UTC | #1
I think this is invalid.
Give explanation why you think your approach is correct one.

On Sun, Apr 11, 2021 at 4:54 PM Zhong Li <zhongli_dev@126.com> wrote:

> Signed-off-by: Zhong Li <zhongli_dev@126.com>
> ---
>  libavfilter/vf_cas.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_cas.c b/libavfilter/vf_cas.c
> index 7c32ed5f9b..b44a100421 100644
> --- a/libavfilter/vf_cas.c
> +++ b/libavfilter/vf_cas.c
> @@ -65,7 +65,7 @@ static int cas_slice8(AVFilterContext *avctx, void *arg,
> int jobnr, int nb_jobs)
>          const uint8_t *src = in->data[p];
>
>          if (!((1 << p) & s->planes)) {
> -            av_image_copy_plane(dst, linesize, src + slice_start *
> linesize, in_linesize,
> +            av_image_copy_plane(dst, linesize, src + slice_start *
> in_linesize, in_linesize,
>                                  w, slice_end - slice_start);
>              continue;
>          }
> --
> 2.17.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Carl Eugen Hoyos April 11, 2021, 4:28 p.m. UTC | #2
Am So., 11. Apr. 2021 um 17:25 Uhr schrieb Paul B Mahol <onemda@gmail.com>:
>
> I think this is invalid.
> Give explanation why you think your approach is correct one.
>
> On Sun, Apr 11, 2021 at 4:54 PM Zhong Li <zhongli_dev@126.com> wrote:
>
> > Signed-off-by: Zhong Li <zhongli_dev@126.com>
> > ---
> >  libavfilter/vf_cas.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavfilter/vf_cas.c b/libavfilter/vf_cas.c
> > index 7c32ed5f9b..b44a100421 100644
> > --- a/libavfilter/vf_cas.c
> > +++ b/libavfilter/vf_cas.c
> > @@ -65,7 +65,7 @@ static int cas_slice8(AVFilterContext *avctx, void *arg,
> > int jobnr, int nb_jobs)
> >          const uint8_t *src = in->data[p];
> >
> >          if (!((1 << p) & s->planes)) {
> > -            av_image_copy_plane(dst, linesize, src + slice_start *
> > linesize, in_linesize,
> > +            av_image_copy_plane(dst, linesize, src + slice_start *
> > in_linesize, in_linesize,

It looks to me as if before the patch the (output) linesize was
combined with the (input) src pointer which is surprising.

Carl Eugen
diff mbox series

Patch

diff --git a/libavfilter/vf_cas.c b/libavfilter/vf_cas.c
index 7c32ed5f9b..b44a100421 100644
--- a/libavfilter/vf_cas.c
+++ b/libavfilter/vf_cas.c
@@ -65,7 +65,7 @@  static int cas_slice8(AVFilterContext *avctx, void *arg, int jobnr, int nb_jobs)
         const uint8_t *src = in->data[p];
 
         if (!((1 << p) & s->planes)) {
-            av_image_copy_plane(dst, linesize, src + slice_start * linesize, in_linesize,
+            av_image_copy_plane(dst, linesize, src + slice_start * in_linesize, in_linesize,
                                 w, slice_end - slice_start);
             continue;
         }