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

Fixes ticket #8607.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
(cherry picked from commit 5216edbc54)
This commit is contained in:
Matthieu Bouron 2020-04-09 16:53:21 +02:00
parent 60d8a54432
commit a7b0ab2a23
1 changed files with 6 additions and 0 deletions

View File

@ -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;