tmp input
authoryu.dongliang <18588496441@163.com>
Wed, 12 Apr 2023 07:25:34 +0000 (15:25 +0800)
committeryu.dongliang <18588496441@163.com>
Wed, 12 Apr 2023 07:25:34 +0000 (15:25 +0800)
simp_ffmpeg_input.c

index baa55ee8975b1c55ca27c2cbb54ac30380cc84ca..f28b7fa0566f6c8bb574a75adbe714c570c86d2d 100644 (file)
@@ -255,17 +255,21 @@ static int __ffmpeg_decode(simp_avio_t* io, AVCodecContext* dec_ctx, AVPacket* p
                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);
                }