[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 Accepted
Commit 370b8bd8470a9d7d041febc4ef2a7282b41fbdbb
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
Steven Liu Nov. 25, 2018, 6:02 a.m.
> On Oct 9, 2018, at 10:33, Liu Steven <lq@chinaffmpeg.org> wrote:
> 
> 
> 
>> 在 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
Pushed.
> 
> Thanks
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Thanks
Steven

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,