Skip to content

Commit

Permalink
avcodec/mediacodec_wrapper: fix {input,output}_buffers global referen…
Browse files Browse the repository at this point in the history
…ce leak

Fixes ticket #8607.

Signed-off-by: Matthieu Bouron <[email protected]>
  • Loading branch information
mbouron committed Apr 15, 2020
1 parent 51db0a4 commit 5216edb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libavcodec/mediacodec_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5216edb

Please sign in to comment.