aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-09-13 20:45:55 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2017-05-09 14:45:54 +0200
commit016064625fd5fb6ba31a797cfd7d9c7f0419ca8c (patch)
treeb4c6e6a0b7f9774001a2ef5865eda20f823b4c41
parent582c3d514a7b40d38fff610da2110ac63dfe2e10 (diff)
downloadffmpeg-016064625fd5fb6ba31a797cfd7d9c7f0419ca8c.tar.gz
hwcontext_vdpau: Fix missing subscripts
Also remove the redundant casts which were hiding the error here. Fixes Ubuntu bug 1688735, reported by andysem. (cherry picked from commit 7081620aca36e616ea96f71fd71d2703e3abae09)
-rw-r--r--libavutil/hwcontext_vdpau.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/hwcontext_vdpau.c b/libavutil/hwcontext_vdpau.c
index 49c44fed0d..cce5396043 100644
--- a/libavutil/hwcontext_vdpau.c
+++ b/libavutil/hwcontext_vdpau.c
@@ -305,7 +305,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]);
@@ -356,7 +356,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]);