Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-11-06 23:24:31 +0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-11-08 22:57:34 +0400
commit3ba416408aef99b4d7d92719c0a03dc2c9647025 (patch)
treee8b3af40f10a929fc9c6c856386221883b42bf0c /avconv.c
parent00f8ad41c78df71c464e98d2c1171a40f205db78 (diff)
avconv: rescale packet duration to muxer time base when flushing encoders
Fixes Bug 385
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/avconv.c b/avconv.c
index 964847a488..c931c46de5 100644
--- a/avconv.c
+++ b/avconv.c
@@ -964,6 +964,8 @@ static void flush_encoders(void)
pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base);
if (pkt.dts != AV_NOPTS_VALUE)
pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base);
+ if (pkt.duration > 0)
+ pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base);
write_frame(os, &pkt, ost);
}