diff mbox series

[FFmpeg-devel,v2,3/6] avutil/jni: use size_t to store structure offsets

Message ID 20240227145536.281991-4-matthieu.bouron@gmail.com
State New
Headers show
Series [FFmpeg-devel,v2,1/6] avcodec: add av_jni_{get, set}_android_app_ctx helper | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Matthieu Bouron Feb. 27, 2024, 2:50 p.m. UTC
---
 libavcodec/ffjni.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andreas Rheinhardt March 4, 2024, 8:10 p.m. UTC | #1
Matthieu Bouron:
> ---
>  libavcodec/ffjni.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h
> index 6027bac0ab..d5894609ed 100644
> --- a/libavcodec/ffjni.h
> +++ b/libavcodec/ffjni.h
> @@ -24,6 +24,7 @@
>  #define AVCODEC_FFJNI_H
>  
>  #include <jni.h>
> +#include <stdlib.h>
>  

stddef.h is the "cheaper" header for size_t.

>  /*
>   * Attach permanently a JNI environment to the current thread and retrieve it.
> @@ -105,7 +106,7 @@ struct FFJniField {
>      const char *method;
>      const char *signature;
>      enum FFJniFieldType type;
> -    int offset;
> +    size_t offset;
>      int mandatory;
>  
>  };
Matthieu Bouron March 5, 2024, 7:58 a.m. UTC | #2
On Mon, Mar 04, 2024 at 09:10:49PM +0100, Andreas Rheinhardt wrote:
> Matthieu Bouron:
> > ---
> >  libavcodec/ffjni.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h
> > index 6027bac0ab..d5894609ed 100644
> > --- a/libavcodec/ffjni.h
> > +++ b/libavcodec/ffjni.h
> > @@ -24,6 +24,7 @@
> >  #define AVCODEC_FFJNI_H
> >  
> >  #include <jni.h>
> > +#include <stdlib.h>
> >  
> 
> stddef.h is the "cheaper" header for size_t.

New patch attached.
From 0a5f890dcbedf87da3df5b49ece545a847e423a4 Mon Sep 17 00:00:00 2001
From: Matthieu Bouron <matthieu.bouron@gmail.com>
Date: Tue, 13 Feb 2024 11:03:22 +0100
Subject: [PATCH v3 3/6] avcodec/jni: use size_t to store structure offsets

---
 libavcodec/ffjni.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h
index 6027bac0ab..d1e86f8329 100644
--- a/libavcodec/ffjni.h
+++ b/libavcodec/ffjni.h
@@ -24,6 +24,7 @@
 #define AVCODEC_FFJNI_H
 
 #include <jni.h>
+#include <stddef.h>
 
 /*
  * Attach permanently a JNI environment to the current thread and retrieve it.
@@ -105,7 +106,7 @@ struct FFJniField {
     const char *method;
     const char *signature;
     enum FFJniFieldType type;
-    int offset;
+    size_t offset;
     int mandatory;
 
 };
diff mbox series

Patch

diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h
index 6027bac0ab..d5894609ed 100644
--- a/libavcodec/ffjni.h
+++ b/libavcodec/ffjni.h
@@ -24,6 +24,7 @@ 
 #define AVCODEC_FFJNI_H
 
 #include <jni.h>
+#include <stdlib.h>
 
 /*
  * Attach permanently a JNI environment to the current thread and retrieve it.
@@ -105,7 +106,7 @@  struct FFJniField {
     const char *method;
     const char *signature;
     enum FFJniFieldType type;
-    int offset;
+    size_t offset;
     int mandatory;
 
 };