summaryrefslogtreecommitdiff
path: root/libavformat/dashenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-23 01:32:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-23 01:34:05 +0100
commit9f0fd17c614f46bd22740b2ab97743707f654e2d (patch)
treea8b64b4ac774c5f5ab40d66aaae804a8b8651410 /libavformat/dashenc.c
parent6d8dda169384e3935d38da2ed127ba82fd666ee7 (diff)
parentf856d9c2f314c493c672dfb9c876da182525da3d (diff)
Merge commit 'f856d9c2f314c493c672dfb9c876da182525da3d'
* commit 'f856d9c2f314c493c672dfb9c876da182525da3d': dashenc: Don't require the stream bitrate to be known Conflicts: libavformat/dashenc.c See: 5f8fcdd4481b3e740d76b09e10a80e3271ef47b5 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/dashenc.c')
-rw-r--r--libavformat/dashenc.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index dac217e65c..8bf507728f 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -445,10 +445,15 @@ static int dash_write_header(AVFormatContext *s)
s->streams[i]->codec->rc_max_rate;
if (bit_rate) {
snprintf(os->bandwidth_str, sizeof(os->bandwidth_str),
- " bandwidth=\"%i\"", bit_rate);
+ " bandwidth=\"%d\"", bit_rate);
} else {
- av_log(s, AV_LOG_WARNING, "No bit rate set for stream %d\n", i);
- os->bandwidth_str[0] = 0;
+ int level = s->strict_std_compliance >= FF_COMPLIANCE_STRICT ?
+ 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();