[FFmpeg-cvslog] hwcontext_vdpau: Fix missing subscripts

Mark Thompson git at videolan.org
Mon Mar 20 17:41:59 EET 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Tue Sep 13 20:45:55 2016 +0100| [7081620aca36e616ea96f71fd71d2703e3abae09] | committer: Mark Thompson

hwcontext_vdpau: Fix missing subscripts

Also remove the redundant casts which were hiding the error here.

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

 libavutil/hwcontext_vdpau.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/hwcontext_vdpau.c b/libavutil/hwcontext_vdpau.c
index 4860aaa..b12109c 100644
--- a/libavutil/hwcontext_vdpau.c
+++ b/libavutil/hwcontext_vdpau.c
@@ -304,7 +304,7 @@ static int vdpau_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
 
     for (i = 0; i< FF_ARRAY_ELEMS(data) && dst->data[i]; i++) {
         data[i] = dst->data[i];
-        if (dst->linesize[i] < 0 || (uint64_t)dst->linesize > UINT32_MAX) {
+        if (dst->linesize[i] < 0 || dst->linesize[i] > UINT32_MAX) {
             av_log(ctx, AV_LOG_ERROR,
                    "The linesize %d cannot be represented as uint32\n",
                    dst->linesize[i]);
@@ -355,7 +355,7 @@ static int vdpau_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
 
     for (i = 0; i< FF_ARRAY_ELEMS(data) && src->data[i]; i++) {
         data[i] = src->data[i];
-        if (src->linesize[i] < 0 || (uint64_t)src->linesize > UINT32_MAX) {
+        if (src->linesize[i] < 0 || src->linesize[i] > UINT32_MAX) {
             av_log(ctx, AV_LOG_ERROR,
                    "The linesize %d cannot be represented as uint32\n",
                    src->linesize[i]);



More information about the ffmpeg-cvslog mailing list