[FFmpeg-cvslog] ffmpeg: Print a warning if a pkt duration is already set before using the frame rate
Michael Niedermayer
git at videolan.org
Wed Nov 11 15:13:56 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Nov 10 22:53:30 2015 +0100| [363673fbe0e182b96556f933d47e223eb477badb] | committer: 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: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=363673fbe0e182b96556f933d47e223eb477badb
---
ffmpeg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index ae78270..438175b 100644
--- a/ffmpeg.c
+++ b/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 (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);
}
More information about the ffmpeg-cvslog
mailing list