[FFmpeg-devel] [PATCH 2/2] lavc/mediacodec: add missing MediaCodec.Get{Input, Output}Buffer() checks
Matthieu Bouron
matthieu.bouron at gmail.com
Thu May 19 11:46:22 CEST 2016
On Tue, May 17, 2016 at 03:20:54PM +0200, Matthieu Bouron wrote:
> From: Matthieu Bouron <matthieu.bouron at stupeflix.com>
>
> ---
> libavcodec/mediacodec_wrapper.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
> index 8ce3b32..5c047ea 100644
> --- a/libavcodec/mediacodec_wrapper.c
> +++ b/libavcodec/mediacodec_wrapper.c
> @@ -1056,6 +1056,10 @@ FFAMediaCodec* ff_AMediaCodec_createCodecByName(const char *name)
> goto fail;
> }
>
> + if (codec->jfields.get_input_buffer_id && codec->jfields.get_output_buffer_id) {
> + codec->has_get_i_o_buffer = 1;
> + }
> +
> JNI_DETACH_ENV(attached, codec);
>
> return codec;
> @@ -1178,6 +1182,10 @@ FFAMediaCodec* ff_AMediaCodec_createEncoderByType(const char *mime)
> goto fail;
> }
>
> + if (codec->jfields.get_input_buffer_id && codec->jfields.get_output_buffer_id) {
> + codec->has_get_i_o_buffer = 1;
> + }
> +
> JNI_DETACH_ENV(attached, NULL);
>
> return codec;
I will push both patch in one day if there is no objection.
Matthieu
[...]
More information about the ffmpeg-devel
mailing list