MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / init_input_threads

Function init_input_threads

ffmpeg-single-cmd/src/main/cpp/ffmpeg_mod.c:4024–4049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4022}
4023
4024static int init_input_threads(void)
4025{
4026 int i, ret;
4027
4028 if (nb_input_files == 1)
4029 return 0;
4030
4031 for (i = 0; i < nb_input_files; i++) {
4032 InputFile *f = input_files[i];
4033
4034 if (f->ctx->pb ? !f->ctx->pb->seekable :
4035 strcmp(f->ctx->iformat->name, "lavfi"))
4036 f->non_blocking = 1;
4037 ret = av_thread_message_queue_alloc(&f->in_thread_queue,
4038 f->thread_queue_size, sizeof(AVPacket));
4039 if (ret < 0)
4040 return ret;
4041
4042 if ((ret = pthread_create(&f->thread, NULL, input_thread, f))) {
4043 av_log(NULL, AV_LOG_ERROR, "pthread_create failed: %s. Try to increase `ulimit -v` or decrease `ulimit -s`.\n", strerror(ret));
4044 av_thread_message_queue_free(&f->in_thread_queue);
4045 return AVERROR(ret);
4046 }
4047 }
4048 return 0;
4049}
4050
4051static int get_input_packet_mt(InputFile *f, AVPacket *pkt)
4052{

Callers 1

transcodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected