Browse Source

lavc/mediacodec: add missing MediaCodec.Get{Input,Output}Buffer() checks

tags/n3.1
Matthieu Bouron 9 years ago
parent
commit
d14deeb6bc
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      libavcodec/mediacodec_wrapper.c

+ 8
- 0
libavcodec/mediacodec_wrapper.c View File

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


Loading…
Cancel
Save