diff options
author | Aman Gupta <aman@tmm1.net> | 2018-07-31 18:34:15 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2018-10-11 20:51:14 -0700 |
commit | f6d48b618aadb7acea6539e3973c91e14164f531 (patch) | |
tree | 4c2bdc25c9dce6cf76c29b8054c296bd26824d32 /libavcodec/mediacodec_wrapper.c | |
parent | e265832c378c3f4dc372f1c0f477810f63dd60fd (diff) | |
download | ffmpeg-f6d48b618aadb7acea6539e3973c91e14164f531.tar.gz |
avcodec/mediacodec: add av_mediacodec_render_buffer_at_time()
The existing av_mediacodec_release_buffer allows the user to render
or discard the Surface-backed frame. This new method allows the user
to control exactly when the frame will be rendered to its SurfaceView.
Available since Android API 21.
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavcodec/mediacodec_wrapper.c')
-rw-r--r-- | libavcodec/mediacodec_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index c47c2c9a41..a024e3bdb1 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -1432,7 +1432,7 @@ int ff_AMediaCodec_releaseOutputBufferAtTime(FFAMediaCodec *codec, size_t idx, i JNI_GET_ENV_OR_RETURN(env, codec, AVERROR_EXTERNAL); - (*env)->CallVoidMethod(env, codec->object, codec->jfields.release_output_buffer_at_time_id, (jint)idx, timestampNs); + (*env)->CallVoidMethod(env, codec->object, codec->jfields.release_output_buffer_at_time_id, (jint)idx, (jlong)timestampNs); if (ff_jni_exception_check(env, 1, codec) < 0) { ret = AVERROR_EXTERNAL; goto fail; |