Commit 363673fb authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: Print a warning if a pkt duration is already set before using the frame rate

I didnt find any case that triggers this but if it gets triggered it needs to be
investigated
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 46070cc2
......@@ -673,6 +673,8 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
}
if (ost->frame_rate.num && ost->is_cfr) {
if (pkt->duration > 0)
av_log(NULL, AV_LOG_WARNING, "Overriding packet duration by frame rate, this should not happen\n");
pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate),
ost->st->time_base);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment