[FFmpeg-devel] libavcodec/libdavs2.c: Fix for the wrong line size is used

Submitted by lance.lmwang@gmail.com on Oct. 8, 2018, 2:55 a.m.

Details

Message ID 1538967303-59721-1-git-send-email-lance.lmwang@gmail.com
State New
Headers show

Commit Message

lance.lmwang@gmail.com Oct. 8, 2018, 2:55 a.m.
From: Limin Wang <lance.lmwang@gmail.com>

---
 libavcodec/libdavs2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steven Liu Oct. 9, 2018, 2:33 a.m.
> 在 2018年10月8日,上午10:55,lance.lmwang@gmail.com 写道:
> 
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> ---
> libavcodec/libdavs2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c
> index aa14782..91ad7a4 100644
> --- a/libavcodec/libdavs2.c
> +++ b/libavcodec/libdavs2.c
> @@ -88,7 +88,7 @@ static int davs2_dump_frames(AVCodecContext *avctx, davs2_picture_t *pic,
>         }
> 
>         frame->data[plane]     = frame->buf[plane]->data;
> -        frame->linesize[plane] = pic->widths[plane];
> +        frame->linesize[plane] = size_line;
> 
>         for (line = 0; line < pic->lines[plane]; ++line)
>             memcpy(frame->data[plane] + line * size_line,
> -- 
> 2.6.4
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

LGTM

Thanks

Patch hide | download patch | download mbox

diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c
index aa14782..91ad7a4 100644
--- a/libavcodec/libdavs2.c
+++ b/libavcodec/libdavs2.c
@@ -88,7 +88,7 @@  static int davs2_dump_frames(AVCodecContext *avctx, davs2_picture_t *pic,
         }
 
         frame->data[plane]     = frame->buf[plane]->data;
-        frame->linesize[plane] = pic->widths[plane];
+        frame->linesize[plane] = size_line;
 
         for (line = 0; line < pic->lines[plane]; ++line)
             memcpy(frame->data[plane] + line * size_line,