mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
fftools: Fix MediaCodec on Android15+
On Android15+ MediaCodec HAL backend was switched from HIDL to AIDL.
As a result, MediaCodec operations started to hang, see:
https://trac.ffmpeg.org/ticket/11363
https://github.com/termux/termux-packages/issues/21264
https://issuetracker.google.com/issues/382831999
To fix that it is necessary to initialize binder thread pool.
Signed-off-by: Dmitrii Okunev <xaionaro@dx.center>
This commit is contained in:
committed by
Zhao Zhili
parent
d3e80837e7
commit
eccbbd528e
@@ -51,6 +51,7 @@ OBJS-ffprobe += \
|
||||
fftools/textformat/tw_buffer.o \
|
||||
fftools/textformat/tw_stdout.o \
|
||||
|
||||
OBJS-ffmpeg += $(COMPAT_OBJS:%=compat/%)
|
||||
OBJS-ffplay += fftools/ffplay_renderer.o
|
||||
|
||||
define DOFFTOOL
|
||||
|
||||
@@ -78,6 +78,9 @@
|
||||
#include "libavdevice/avdevice.h"
|
||||
|
||||
#include "cmdutils.h"
|
||||
#if CONFIG_MEDIACODEC
|
||||
#include "compat/android/binder.h"
|
||||
#endif
|
||||
#include "ffmpeg.h"
|
||||
#include "ffmpeg_sched.h"
|
||||
#include "ffmpeg_utils.h"
|
||||
@@ -1019,6 +1022,10 @@ int main(int argc, char **argv)
|
||||
goto finish;
|
||||
}
|
||||
|
||||
#if CONFIG_MEDIACODEC
|
||||
android_binder_threadpool_init_if_required();
|
||||
#endif
|
||||
|
||||
current_time = ti = get_benchmark_time_stamps();
|
||||
ret = transcode(sch);
|
||||
if (ret >= 0 && do_benchmark) {
|
||||
|
||||
Reference in New Issue
Block a user