From 9989d6732a55da6607666d709d2703e43ff33542 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 20 Nov 2021 23:55:40 -0500 Subject: [PATCH] [visual_resize] take unsigned rows, cols --- src/lib/internal.h | 2 +- src/media/ffmpeg.c | 2 +- src/media/oiio.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/internal.h b/src/lib/internal.h index 2adb965c4..a25c2075d 100644 --- a/src/lib/internal.h +++ b/src/lib/internal.h @@ -1752,7 +1752,7 @@ typedef struct ncvisual_implementation { struct ncplane* (*visual_subtitle)(struct ncplane* parent, const struct ncvisual* ncv); int rowalign; // rowstride base, can be 0 for no padding // do a persistent resize, changing the ncv itself - int (*visual_resize)(struct ncvisual* ncv, int rows, int cols); + int (*visual_resize)(struct ncvisual* ncv, unsigned rows, unsigned cols); void (*visual_destroy)(struct ncvisual* ncv); bool canopen_images; bool canopen_videos; diff --git a/src/media/ffmpeg.c b/src/media/ffmpeg.c index 063fdee60..43d76063a 100644 --- a/src/media/ffmpeg.c +++ b/src/media/ffmpeg.c @@ -607,7 +607,7 @@ ffmpeg_resize_internal(const ncvisual* ncv, int rows, int* stride, int cols, } // resize frame, converting to RGBA (if necessary) along the way -int ffmpeg_resize(ncvisual* n, int rows, int cols){ +int ffmpeg_resize(ncvisual* n, unsigned rows, unsigned cols){ struct blitterargs bargs = {}; int stride; void* data = ffmpeg_resize_internal(n, rows, &stride, cols, &bargs); diff --git a/src/media/oiio.cpp b/src/media/oiio.cpp index 320031833..e2070aeed 100644 --- a/src/media/oiio.cpp +++ b/src/media/oiio.cpp @@ -126,7 +126,7 @@ int oiio_decode_loop(ncvisual* ncv){ } // resize, converting to RGBA (if necessary) along the way -int oiio_resize(ncvisual* nc, int rows, int cols) { +int oiio_resize(ncvisual* nc, unsigned rows, unsigned cols) { //fprintf(stderr, "%d/%d -> %d/%d on the resize\n", nc->pixy, nc->pixx, rows, cols); auto ibuf = std::make_unique(); if(nc->details->ibuf && (nc->pixx != cols || nc->pixy != rows)){ // scale it