Commit 2a9ffd89 authored by Przemysław Sobala's avatar Przemysław Sobala Committed by Karthick J

avformat/dashenc: use AVStream timebase when computing missing bitrate

parent 317b722c
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment