[FFmpeg-cvslog] avutil/hwcontext_opencl: Fix missing linesize when map from opencl

Zhao Zhili git at videolan.org
Fri Mar 1 12:11:11 EET 2024


ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Fri Feb 23 22:11:42 2024 +0800| [dcfc6089b1ea06fdcdf7778b881406b929a83cba] | committer: Zhao Zhili

avutil/hwcontext_opencl: Fix missing linesize when map from opencl

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dcfc6089b1ea06fdcdf7778b881406b929a83cba
---

 libavutil/hwcontext_opencl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
index c1764ed098..de093fffb1 100644
--- a/libavutil/hwcontext_opencl.c
+++ b/libavutil/hwcontext_opencl.c
@@ -2014,6 +2014,7 @@ static int opencl_map_frame(AVHWFramesContext *hwfc, AVFrame *dst,
         }
 
         dst->data[p] = map->address[p];
+        dst->linesize[p] = row_pitch;
 
         av_log(hwfc, AV_LOG_DEBUG, "Map plane %d (%p -> %p).\n",
                p, src->data[p], dst->data[p]);



More information about the ffmpeg-cvslog mailing list