[03/15] rectangle: Change type of array stride parameters to ptrdiff_t

Message ID 1473178294-16959-3-git-send-email-diego@biurrun.de
State New
Headers show

Commit Message

Diego Biurrun Sept. 6, 2016, 4:11 p.m.
ptrdiff_t is the correct type for array strides and similar.
---
 libavcodec/rectangle.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Luca Barbato Sept. 6, 2016, 7:50 p.m. | #1
On 06/09/16 18:11, Diego Biurrun wrote:
> ptrdiff_t is the correct type for array strides and similar.
> ---
>  libavcodec/rectangle.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 

Ok.

Patch

diff --git a/libavcodec/rectangle.h b/libavcodec/rectangle.h
index 616a637..2fc264d 100644
--- a/libavcodec/rectangle.h
+++ b/libavcodec/rectangle.h
@@ -38,7 +38,10 @@ 
  * @param w width of the rectangle, should be a constant
  * @param size the size of val (1, 2 or 4), should be a constant
  */
-static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, uint32_t val, int size){
+static av_always_inline void fill_rectangle(void *vp, int w, int h,
+                                            ptrdiff_t stride, uint32_t val,
+                                            int size)
+{
     uint8_t *p= (uint8_t*)vp;
     assert(size==1 || size==2 || size==4);
     assert(w<=4);