Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec_wrapper: fix {input, output}_buffers global reference leak
On Tue, Apr 14, 2020 at 09:51:08AM +0200, Matthieu Bouron wrote: > On Thu, Apr 09, 2020 at 05:06:05PM +0200, Matthieu Bouron wrote: > > Fixes ticket #8607. > > --- > > libavcodec/mediacodec_wrapper.c | 6 ++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/libavcodec/mediacodec_wrapper.c > > b/libavcodec/mediacodec_wrapper.c > > index 5213cf640a7..79abc8b6aa9 100644 > > --- a/libavcodec/mediacodec_wrapper.c > > +++ b/libavcodec/mediacodec_wrapper.c > > @@ -1303,6 +1303,12 @@ int ff_AMediaCodec_delete(FFAMediaCodec* codec) > > ret = AVERROR_EXTERNAL; > > } > > > > +(*env)->DeleteGlobalRef(env, codec->input_buffers); > > +codec->input_buffers = NULL; > > + > > +(*env)->DeleteGlobalRef(env, codec->output_buffers); > > +codec->output_buffers = NULL; > > + > > (*env)->DeleteGlobalRef(env, codec->object); > > codec->object = NULL; > > > > -- > > 2.26.0 > > > > The user confirmed the patch fixes the issue. I will apply this patch > tomorrow if there is no objection. Applied. -- Matthieu B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec_wrapper: fix {input, output}_buffers global reference leak
On Thu, Apr 09, 2020 at 05:06:05PM +0200, Matthieu Bouron wrote: > Fixes ticket #8607. > --- > libavcodec/mediacodec_wrapper.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c > index 5213cf640a7..79abc8b6aa9 100644 > --- a/libavcodec/mediacodec_wrapper.c > +++ b/libavcodec/mediacodec_wrapper.c > @@ -1303,6 +1303,12 @@ int ff_AMediaCodec_delete(FFAMediaCodec* codec) > ret = AVERROR_EXTERNAL; > } > > +(*env)->DeleteGlobalRef(env, codec->input_buffers); > +codec->input_buffers = NULL; > + > +(*env)->DeleteGlobalRef(env, codec->output_buffers); > +codec->output_buffers = NULL; > + > (*env)->DeleteGlobalRef(env, codec->object); > codec->object = NULL; > > -- > 2.26.0 > The user confirmed the patch fixes the issue. I will apply this patch tomorrow if there is no objection. -- Matthieu B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/mediacodec_wrapper: fix {input, output}_buffers global reference leak
Fixes ticket #8607. --- libavcodec/mediacodec_wrapper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 5213cf640a7..79abc8b6aa9 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -1303,6 +1303,12 @@ int ff_AMediaCodec_delete(FFAMediaCodec* codec) ret = AVERROR_EXTERNAL; } +(*env)->DeleteGlobalRef(env, codec->input_buffers); +codec->input_buffers = NULL; + +(*env)->DeleteGlobalRef(env, codec->output_buffers); +codec->output_buffers = NULL; + (*env)->DeleteGlobalRef(env, codec->object); codec->object = NULL; -- 2.26.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".