io->nb_vframes--;
pthread_mutex_unlock(&io->mutex);
- scf_logd("vf->pts: %ld, vtime: %ld, time: %ld, nb_vframes: %d\n", vf->frame->pts, vtime, time, io->nb_vframes);
+ int64_t usec = vtime % 1000000;
+ int64_t sec = vtime / 1000000;
+ int64_t hour = sec / 3600;
+ sec %= 3600;
+ int64_t min = sec / 60;
+ sec %= 60;
+
+ scf_logi("vf->pts: %ld, vtime: %ld, time: %ld, nb_vframes: %d, %ld:%ld:%ld.%ld\n",
+ vf->frame->pts, vtime, time, io->nb_vframes, hour, min, sec, usec);
int ret = av_buffersrc_add_frame_flags(io->vbuffersrc_ctx, vf->frame, AV_BUFFERSRC_FLAG_KEEP_REF);
int64_t time = gettime() - io->start_time;
int64_t atime = af->frame->pts * av_q2d(io->sample_rate) * 1000000LL;
+ if (speed.num > 0 && speed.den > 0)
+ time *= av_q2d(speed);
+
+ else if (io->speed.num > 0 && io->speed.num > 0)
+ time *= av_q2d(io->speed);
+
if (atime < time) {
scf_list_del(&af->list);
pthread_mutex_unlock(&io->mutex);
while (!f->exit) {
- usleep(1000);
+ usleep(100);
for (l = scf_list_head(&f->inputs); l != scf_list_sentinel(&f->inputs); l = scf_list_next(l)) {
io = scf_list_data(l, simp_avio_t, list);