1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Revert "avformat/dashenc: use AVStream timebase when computing missing bitrate"

This reverts commit 2a9ffd89fc as duration is always in AV_TIME_BASE units
This commit is contained in:
Przemysław Sobala 2020-06-16 14:32:03 +02:00 committed by Karthick J
parent fdac3c80ac
commit 19726288d8

View File

@ -1960,7 +1960,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 * (c->use_timeline ? os->ctx->streams[0]->time_base.den : AV_TIME_BASE) / duration;
int64_t bitrate = (int64_t) range_length * 8 * AV_TIME_BASE / duration;
if (bitrate >= 0)
os->bit_rate = bitrate;
}