| 4057 | #endif |
| 4058 | |
| 4059 | static int get_input_packet(InputFile *f, AVPacket *pkt) |
| 4060 | { |
| 4061 | if (f->rate_emu) { |
| 4062 | int i; |
| 4063 | for (i = 0; i < f->nb_streams; i++) { |
| 4064 | InputStream *ist = input_streams[f->ist_index + i]; |
| 4065 | int64_t pts = av_rescale(ist->dts, 1000000, AV_TIME_BASE); |
| 4066 | int64_t now = av_gettime_relative() - ist->start; |
| 4067 | if (pts > now) |
| 4068 | return AVERROR(EAGAIN); |
| 4069 | } |
| 4070 | } |
| 4071 | |
| 4072 | #if HAVE_PTHREADS |
| 4073 | if (nb_input_files > 1) |
| 4074 | return get_input_packet_mt(f, pkt); |
| 4075 | #endif |
| 4076 | return av_read_frame(f->ctx, pkt); |
| 4077 | } |
| 4078 | |
| 4079 | static int got_eagain(void) |
| 4080 | { |
no test coverage detected