FFprobe is re-initialized on every ffprobe run. Emscripten's ENVIRONMENT variable was set to "WORKER". Node.js-related code should no longer be present in ffmpeg-core.js.

This commit is contained in:
izogfif 2024-08-30 07:07:11 +00:00
parent 8d63b3a9c2
commit bd903bbf18
2 changed files with 54 additions and 0 deletions

View File

@ -30,6 +30,7 @@ CONF_FLAGS=(
-lswscale
-Wno-deprecated-declarations
$LDFLAGS
-sENVIRONMENT=worker
-sWASM_BIGINT # enable big int support
-sUSE_SDL=2 # use emscripten SDL2 lib port
-sMODULARIZE # modularized to use as a library

View File

@ -382,6 +382,58 @@ static void ffprobe_cleanup(int ret)
#if HAVE_THREADS
pthread_mutex_destroy(&log_mutex);
#endif
do_bitexact = 0;
do_count_frames = 0;
do_count_packets = 0;
do_read_frames = 0;
do_read_packets = 0;
do_show_chapters = 0;
do_show_error = 0;
do_show_format = 0;
do_show_frames = 0;
do_show_packets = 0;
do_show_programs = 0;
do_show_streams = 0;
do_show_stream_disposition = 0;
do_show_data = 0;
do_show_program_version = 0;
do_show_library_versions = 0;
do_show_pixel_formats = 0;
do_show_pixel_format_flags = 0;
do_show_pixel_format_components = 0;
do_show_log = 0;
do_show_chapter_tags = 0;
do_show_format_tags = 0;
do_show_frame_tags = 0;
do_show_program_tags = 0;
do_show_stream_tags = 0;
do_show_packet_tags = 0;
show_value_unit = 0;
use_value_prefix = 0;
use_byte_value_binary_prefix = 0;
use_value_sexagesimal_format = 0;
show_private_data = 1;
show_optional_fields = SHOW_OPTIONAL_FIELDS_AUTO;
print_format = NULL;
stream_specifier = NULL;
show_data_hash = NULL;
read_intervals = NULL;
read_intervals_nb = 0;
find_stream_info = 1;
input_filename = NULL;
print_input_filename = NULL;
iformat = NULL;
output_filename = NULL;
hash = NULL;
nb_streams = 0;
nb_streams_packets = NULL;
nb_streams_frames = NULL;
selected_streams = NULL;
log_buffer = NULL;
log_buffer_size = 0;
av_log(NULL, AV_LOG_DEBUG, "FFprobe: Cleanup done.\n");
}
struct unit_value {
@ -4037,6 +4089,7 @@ int ffprobe(int argc, char **argv)
}
#endif
av_log_set_flags(AV_LOG_SKIP_REPEATED);
ffprobe_cleanup(0);
register_exit(ffprobe_cleanup);
options = real_options;