summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 00d5476b7c..7f3c426e09 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -671,6 +671,11 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
else
ost->error[i] = -1;
}
+
+ if (ost->frame_rate.num) {
+ pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate),
+ ost->st->time_base);
+ }
}
if (bsfc)