Feature: using multi-thread to decode

pull/221/head
xufuji456 3 years ago
parent 31b0be34b1
commit 037588daf5
  1. 2
      app/src/main/cpp/metadata/ffmpeg_media_retriever.c

@ -192,6 +192,8 @@ int set_data_source_inner(State **state_ptr, const char* path) {
if (video_index >= 0) { if (video_index >= 0) {
stream_component_open(state, video_index); stream_component_open(state, video_index);
state->codecCtx->thread_count = 3; // using multi-thread to decode
state->codecCtx->thread_type = FF_THREAD_FRAME; // FF_THREAD_SLICE
} }
set_duration(state->pFormatCtx); set_duration(state->pFormatCtx);

Loading…
Cancel
Save