mirror of https://git.ffmpeg.org/ffmpeg.git
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: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
46070cc20a
commit
363673fbe0
2
ffmpeg.c
2
ffmpeg.c
|
@ -673,6 +673,8 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ost->frame_rate.num && ost->is_cfr) {
|
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),
|
pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate),
|
||||||
ost->st->time_base);
|
ost->st->time_base);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue