aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishwanath Dixit <vdixit@akamai.com>2018-04-11 12:32:03 +0530
committerKarthick Jeyapal <kjeyapal@akamai.com>2018-04-17 14:34:25 +0530
commit0c7bc7eb4789f4ee27296c0ff85c6d973c157531 (patch)
treef9b52d1f1c93bd1232980821f0a8ae2a11030e12
parent85ae55eca390af4d8bb390eb03ce190c7005f636 (diff)
downloadffmpeg-0c7bc7eb4789f4ee27296c0ff85c6d973c157531.tar.gz
avformat/dashenc: addition of muxer overhead in master playlist's bandwidth
-rw-r--r--libavformat/dashenc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 9c29c05776..1d34bb96d4 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -827,20 +827,23 @@ static int write_manifest(AVFormatContext *s, int final)
for (i = 0; i < s->nb_streams; i++) {
char playlist_file[64];
AVStream *st = s->streams[i];
+ OutputStream *os = &c->streams[i];
if (st->codecpar->codec_type != AVMEDIA_TYPE_AUDIO)
continue;
get_hls_playlist_name(playlist_file, sizeof(playlist_file), NULL, i);
ff_hls_write_audio_rendition(out, (char *)audio_group,
playlist_file, i, is_default);
- max_audio_bitrate = FFMAX(st->codecpar->bit_rate, max_audio_bitrate);
+ max_audio_bitrate = FFMAX(st->codecpar->bit_rate +
+ os->muxer_overhead, max_audio_bitrate);
is_default = 0;
}
for (i = 0; i < s->nb_streams; i++) {
char playlist_file[64];
AVStream *st = s->streams[i];
+ OutputStream *os = &c->streams[i];
char *agroup = NULL;
- int stream_bitrate = st->codecpar->bit_rate;
+ int stream_bitrate = st->codecpar->bit_rate + os->muxer_overhead;
if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && max_audio_bitrate) {
agroup = (char *)audio_group;
stream_bitrate += max_audio_bitrate;