Browse Source

avformat/dashenc: use AVStream timebase when computing missing bitrate

tags/n4.3
Przemysław Sobala Karthick J 5 years ago
parent
commit
2a9ffd89fc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/dashenc.c

+ 1
- 1
libavformat/dashenc.c View File

@@ -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;
}


Loading…
Cancel
Save