projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0c71a5
)
avconv: set packet duration for CFR video streams
author
Anton Khirnov
<anton@khirnov.net>
Sun, 11 Oct 2015 10:07:08 +0000
(12:07 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Sun, 8 Nov 2015 10:49:05 +0000
(11:49 +0100)
avconv.c
patch
|
blob
|
blame
|
history
diff --git
a/avconv.c
b/avconv.c
index
493f9d2
..
7334851
100644
(file)
--- a/
avconv.c
+++ b/
avconv.c
@@
-279,6
+279,11
@@
static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
uint8_t *sd = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_FACTOR,
NULL);
ost->quality = sd ? *(int *)sd : -1;
+
+ if (ost->frame_rate.num) {
+ pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate),
+ ost->st->time_base);
+ }
}
while (bsfc) {