if (nb_vframes) {
(*nb_vframes)++;
+ int64_t pts = f->frame->pts;
+
f->frame->pts = f->frame->pts * av_q2d(s->time_base) / av_q2d(io->frame_rate);
- scf_logi("frame->pts: %ld, stream_index: %d, io->frame_rate: %d:%d, s->time_base: %d:%d\n",
- frame->pts, pkt->stream_index,
+ scf_logd("f->frame->pts: %ld, pts: %ld, stream_index: %d, io->frame_rate: %d:%d, s->time_base: %d:%d\n",
+ f->frame->pts, pts, pkt->stream_index,
io->frame_rate.num, io->frame_rate.den,
s->time_base.num, s->time_base.den);
} else {
+ int64_t pts = f->frame->pts;
+
f->frame->pts = f->frame->pts * av_q2d(s->time_base) / av_q2d(io->sample_rate);
- scf_logi("frame->pts: %ld, stream_index: %d, io->sample_rate: %d:%d, s->time_base: %d:%d\n",
- frame->pts, pkt->stream_index,
+ scf_logd("f->frame->pts: %ld, pts: %ld, stream_index: %d, io->sample_rate: %d:%d, s->time_base: %d:%d\n",
+ f->frame->pts, pts, pkt->stream_index,
io->sample_rate.num, io->sample_rate.den,
s->time_base.num, s->time_base.den);
}