1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

Merge commit 'f856d9c2f314c493c672dfb9c876da182525da3d'

* commit 'f856d9c2f314c493c672dfb9c876da182525da3d':
  dashenc: Don't require the stream bitrate to be known

Conflicts:
	libavformat/dashenc.c

See: 5f8fcdd448
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-11-23 01:32:35 +01:00

View File

@@ -445,10 +445,15 @@ static int dash_write_header(AVFormatContext *s)
s->streams[i]->codec->rc_max_rate; s->streams[i]->codec->rc_max_rate;
if (bit_rate) { if (bit_rate) {
snprintf(os->bandwidth_str, sizeof(os->bandwidth_str), snprintf(os->bandwidth_str, sizeof(os->bandwidth_str),
" bandwidth=\"%i\"", bit_rate); " bandwidth=\"%d\"", bit_rate);
} else { } else {
av_log(s, AV_LOG_WARNING, "No bit rate set for stream %d\n", i); int level = s->strict_std_compliance >= FF_COMPLIANCE_STRICT ?
os->bandwidth_str[0] = 0; AV_LOG_ERROR : AV_LOG_WARNING;
av_log(s, level, "No bit rate set for stream %d\n", i);
if (s->strict_std_compliance >= FF_COMPLIANCE_STRICT) {
ret = AVERROR(EINVAL);
goto fail;
}
} }
ctx = avformat_alloc_context(); ctx = avformat_alloc_context();