From 1d2e7ce97e33c74a949d443a226df531fbf5c7dd Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期三, 25 九月 2019 14:04:09 +0800 Subject: [PATCH] bug fix --- csrc/ffmpeg/format/FormatOut.cpp | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/csrc/ffmpeg/format/FormatOut.cpp b/csrc/ffmpeg/format/FormatOut.cpp index 6b6c38e..dce3f7e 100644 --- a/csrc/ffmpeg/format/FormatOut.cpp +++ b/csrc/ffmpeg/format/FormatOut.cpp @@ -393,9 +393,8 @@ in_stream = in_ctx_->streams[pkt->stream_index]; out_stream = ctx_->streams[pkt->stream_index]; - // if (type == "audio") - // logIt("BEFORE stream %d type: %s, pts: %lld, dts: %lld, duration: %lld", - // pkt.stream_index, type.c_str(), pkt.pts, pkt.pts, pkt.duration); + // logIt("BEFORE stream %d, pts: %lld, dts: %lld, duration: %lld", + // pkt->stream_index, pkt->pts, pkt->dts, pkt->duration); //杞崲 PTS/DTS 鏃跺簭 pkt->pts = av_rescale_q_rnd(pkt->pts,in_stream->time_base,out_stream->time_base,(enum AVRounding)(AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX)); @@ -403,10 +402,8 @@ pkt->duration = av_rescale_q(pkt->duration, in_stream->time_base, out_stream->time_base); pkt->pos = -1; - // if (type == "audio") - // logIt("AFTER stream %d type: %s, pts: %lld, dts: %lld, duration: %lld", - // pkt.stream_index, type.c_str(), pkt.pts, pkt.pts, pkt.duration); - + // logIt("AFTER stream %d, pts: %lld, dts: %lld, duration: %lld", + // pkt->stream_index, pkt->pts, pkt->dts, pkt->duration); } bool FormatOut::writeFrame(AVPacket *pkt, const int64_t &frame_cnt, -- Gitblit v1.8.0