summaryrefslogtreecommitdiff
path: root/libavformat/dashenc.c
diff options
context:
space:
mode:
authorPrzemysław Sobala <przemyslaw.sobala@gmail.com>2020-05-27 17:07:22 +0200
committerKarthick J <kjeyapal@akamai.com>2020-06-01 18:58:04 +0530
commit2a9ffd89fcb09bd69b2130da039ad2caba79cf33 (patch)
tree43dfd17f578ab156f99cf2e39b9bdcbca7a484d2 /libavformat/dashenc.c
parent317b722c5129d9f5e4e4fea244cb9e99f1cafda8 (diff)
avformat/dashenc: use AVStream timebase when computing missing bitrate
Diffstat (limited to 'libavformat/dashenc.c')
-rw-r--r--libavformat/dashenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 0cf0df50ef..00a37b175d 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1959,7 +1959,7 @@ static int dash_flush(AVFormatContext *s, int final, int stream)
if (!os->bit_rate) {
// calculate average bitrate of first segment
- int64_t bitrate = (int64_t) range_length * 8 * AV_TIME_BASE / duration;
+ int64_t bitrate = (int64_t) range_length * 8 * (c->use_timeline ? os->ctx->streams[0]->time_base.den : AV_TIME_BASE) / duration;
if (bitrate >= 0)
os->bit_rate = bitrate;
}