[FFmpeg-devel,4/4] avcodec/mediacodec_wrapper: remove unused local variables in ff_AMediaCodec_getCodecNameByType()

Submitted by Matthieu Bouron on July 4, 2019, 1:43 p.m.

Details

Message ID 20190704134348.6071-4-matthieu.bouron@gmail.com
State Accepted
Commit 817235b195f55746893629bd8e6fa3501ea7b38e
Headers show

Commit Message

Matthieu Bouron July 4, 2019, 1:43 p.m.
---
 libavcodec/mediacodec_wrapper.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Matthieu Bouron July 14, 2019, 6:17 p.m.
On Thu, Jul 04, 2019 at 03:43:48PM +0200, Matthieu Bouron wrote:
> ---
>  libavcodec/mediacodec_wrapper.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
> index 70e1e7cae1..5213cf640a 100644
> --- a/libavcodec/mediacodec_wrapper.c
> +++ b/libavcodec/mediacodec_wrapper.c
> @@ -392,8 +392,6 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
>      struct JNIAMediaCodecListFields jfields = { 0 };
>      struct JNIAMediaFormatFields mediaformat_jfields = { 0 };
>  
> -    jobject format = NULL;
> -    jobject codec = NULL;
>      jobject codec_name = NULL;
>  
>      jobject info = NULL;
> @@ -571,14 +569,6 @@ done_with_info:
>      }
>  
>  done:
> -    if (format) {
> -        (*env)->DeleteLocalRef(env, format);
> -    }
> -
> -    if (codec) {
> -        (*env)->DeleteLocalRef(env, codec);
> -    }
> -
>      if (codec_name) {
>          (*env)->DeleteLocalRef(env, codec_name);
>      }
> -- 
> 2.22.0
> 

Ping for the patch set.
Matthieu Bouron July 19, 2019, 7:40 a.m.
On Sun, Jul 14, 2019 at 08:17:03PM +0200, Matthieu Bouron wrote:
> On Thu, Jul 04, 2019 at 03:43:48PM +0200, Matthieu Bouron wrote:
> > ---
> >  libavcodec/mediacodec_wrapper.c | 10 ----------
> >  1 file changed, 10 deletions(-)
> > 
> > diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
> > index 70e1e7cae1..5213cf640a 100644
> > --- a/libavcodec/mediacodec_wrapper.c
> > +++ b/libavcodec/mediacodec_wrapper.c
> > @@ -392,8 +392,6 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
> >      struct JNIAMediaCodecListFields jfields = { 0 };
> >      struct JNIAMediaFormatFields mediaformat_jfields = { 0 };
> >  
> > -    jobject format = NULL;
> > -    jobject codec = NULL;
> >      jobject codec_name = NULL;
> >  
> >      jobject info = NULL;
> > @@ -571,14 +569,6 @@ done_with_info:
> >      }
> >  
> >  done:
> > -    if (format) {
> > -        (*env)->DeleteLocalRef(env, format);
> > -    }
> > -
> > -    if (codec) {
> > -        (*env)->DeleteLocalRef(env, codec);
> > -    }
> > -
> >      if (codec_name) {
> >          (*env)->DeleteLocalRef(env, codec_name);
> >      }
> > -- 
> > 2.22.0
> > 
> 
> Ping for the patch set.

If there is no objection, I will push the patchset in a few days.

> 
> -- 
> Matthieu B.
Matthieu Bouron July 22, 2019, 7:02 a.m.
On Fri, Jul 19, 2019 at 09:40:52AM +0200, Matthieu Bouron wrote:
> On Sun, Jul 14, 2019 at 08:17:03PM +0200, Matthieu Bouron wrote:
> > On Thu, Jul 04, 2019 at 03:43:48PM +0200, Matthieu Bouron wrote:
> > > ---
> > >  libavcodec/mediacodec_wrapper.c | 10 ----------
> > >  1 file changed, 10 deletions(-)
> > > 
> > > diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
> > > index 70e1e7cae1..5213cf640a 100644
> > > --- a/libavcodec/mediacodec_wrapper.c
> > > +++ b/libavcodec/mediacodec_wrapper.c
> > > @@ -392,8 +392,6 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
> > >      struct JNIAMediaCodecListFields jfields = { 0 };
> > >      struct JNIAMediaFormatFields mediaformat_jfields = { 0 };
> > >  
> > > -    jobject format = NULL;
> > > -    jobject codec = NULL;
> > >      jobject codec_name = NULL;
> > >  
> > >      jobject info = NULL;
> > > @@ -571,14 +569,6 @@ done_with_info:
> > >      }
> > >  
> > >  done:
> > > -    if (format) {
> > > -        (*env)->DeleteLocalRef(env, format);
> > > -    }
> > > -
> > > -    if (codec) {
> > > -        (*env)->DeleteLocalRef(env, codec);
> > > -    }
> > > -
> > >      if (codec_name) {
> > >          (*env)->DeleteLocalRef(env, codec_name);
> > >      }
> > > -- 
> > > 2.22.0
> > > 
> > 
> > Ping for the patch set.
> 
> If there is no objection, I will push the patchset in a few days.
> 

Pushed to master. Is it still on time to also be pushed to the 4.2 release
branch ?

Thanks.
Michael Niedermayer July 22, 2019, 11:09 p.m.
On Mon, Jul 22, 2019 at 09:02:15AM +0200, Matthieu Bouron wrote:
> On Fri, Jul 19, 2019 at 09:40:52AM +0200, Matthieu Bouron wrote:
> > On Sun, Jul 14, 2019 at 08:17:03PM +0200, Matthieu Bouron wrote:
> > > On Thu, Jul 04, 2019 at 03:43:48PM +0200, Matthieu Bouron wrote:
> > > > ---
> > > >  libavcodec/mediacodec_wrapper.c | 10 ----------
> > > >  1 file changed, 10 deletions(-)
> > > > 
> > > > diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
> > > > index 70e1e7cae1..5213cf640a 100644
> > > > --- a/libavcodec/mediacodec_wrapper.c
> > > > +++ b/libavcodec/mediacodec_wrapper.c
> > > > @@ -392,8 +392,6 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
> > > >      struct JNIAMediaCodecListFields jfields = { 0 };
> > > >      struct JNIAMediaFormatFields mediaformat_jfields = { 0 };
> > > >  
> > > > -    jobject format = NULL;
> > > > -    jobject codec = NULL;
> > > >      jobject codec_name = NULL;
> > > >  
> > > >      jobject info = NULL;
> > > > @@ -571,14 +569,6 @@ done_with_info:
> > > >      }
> > > >  
> > > >  done:
> > > > -    if (format) {
> > > > -        (*env)->DeleteLocalRef(env, format);
> > > > -    }
> > > > -
> > > > -    if (codec) {
> > > > -        (*env)->DeleteLocalRef(env, codec);
> > > > -    }
> > > > -
> > > >      if (codec_name) {
> > > >          (*env)->DeleteLocalRef(env, codec_name);
> > > >      }
> > > > -- 
> > > > 2.22.0
> > > > 
> > > 
> > > Ping for the patch set.
> > 
> > If there is no objection, I will push the patchset in a few days.
> > 
> 
> Pushed to master. Is it still on time to also be pushed to the 4.2 release
> branch ?

i found no time today for working on the release so theres still time for
any backports of bug fixes, yes

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
index 70e1e7cae1..5213cf640a 100644
--- a/libavcodec/mediacodec_wrapper.c
+++ b/libavcodec/mediacodec_wrapper.c
@@ -392,8 +392,6 @@  char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
     struct JNIAMediaCodecListFields jfields = { 0 };
     struct JNIAMediaFormatFields mediaformat_jfields = { 0 };
 
-    jobject format = NULL;
-    jobject codec = NULL;
     jobject codec_name = NULL;
 
     jobject info = NULL;
@@ -571,14 +569,6 @@  done_with_info:
     }
 
 done:
-    if (format) {
-        (*env)->DeleteLocalRef(env, format);
-    }
-
-    if (codec) {
-        (*env)->DeleteLocalRef(env, codec);
-    }
-
     if (codec_name) {
         (*env)->DeleteLocalRef(env, codec_name);
     }