Commit 5216edbc authored by Matthieu Bouron's avatar Matthieu Bouron

avcodec/mediacodec_wrapper: fix {input,output}_buffers global reference leak

Fixes ticket #8607.
Signed-off-by: 's avatarMatthieu Bouron <matthieu.bouron@gmail.com>
parent 51db0a47
...@@ -1303,6 +1303,12 @@ int ff_AMediaCodec_delete(FFAMediaCodec* codec) ...@@ -1303,6 +1303,12 @@ int ff_AMediaCodec_delete(FFAMediaCodec* codec)
ret = AVERROR_EXTERNAL; 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); (*env)->DeleteGlobalRef(env, codec->object);
codec->object = NULL; codec->object = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment