summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-11-10 18:25:51 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-11-10 18:37:25 +0100
commitd3d4bc4784d911236b232e56e4ae476c484381c8 (patch)
tree05c3b4dade68a91f9c88ccc1a409c16360fe4959 /ffmpeg.c
parentde0e219a8aba72de201e85385c746cd1c04be1a2 (diff)
parent3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4 (diff)
Merge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'
* commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4': avconv: set packet duration for CFR video streams Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
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)