summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-11-10 22:53:30 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-11 15:04:21 +0100
commit363673fbe0e182b96556f933d47e223eb477badb (patch)
tree5c32375a94f150522df2e4fafe6a946552493ad8 /ffmpeg.c
parent46070cc20aa341d385136ec767b127a956f7d9ba (diff)
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>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index ae78270023..438175b586 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);
}