You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avconv: set packet duration for CFR video streams
This commit is contained in:
5
avconv.c
5
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,
|
uint8_t *sd = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_FACTOR,
|
||||||
NULL);
|
NULL);
|
||||||
ost->quality = sd ? *(int *)sd : -1;
|
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) {
|
while (bsfc) {
|
||||||
|
Reference in New Issue
Block a user