diff options
author | Martin Storsjö <martin@martin.st> | 2011-04-24 20:19:49 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-04-24 21:30:03 +0300 |
commit | 5f85d49b6889b9a2ecd18695fe52c5c9b698a0e1 (patch) | |
tree | f4791da650ed501dcb16122c84622b52e07eddd5 | |
parent | ac9cf2e5c48aa1edb2c7ba8e7edfa55c9fde609b (diff) | |
download | ffmpeg-5f85d49b6889b9a2ecd18695fe52c5c9b698a0e1.tar.gz |
applehttp: Don't export variant_bitrate if it isn't known
If there are no variants, the total bitrate of the single
stream isn't known, and exporting variant_bitrate = 0 does
look weird, since there really aren't any variants.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/applehttp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c index 2e0e8a1b3a..822d80bb00 100644 --- a/libavformat/applehttp.c +++ b/libavformat/applehttp.c @@ -505,7 +505,9 @@ static int applehttp_read_header(AVFormatContext *s, AVFormatParameters *ap) goto fail; } avcodec_copy_context(st->codec, v->ctx->streams[j]->codec); - av_metadata_set2(&st->metadata, "variant_bitrate", bitrate_str, 0); + if (v->bandwidth) + av_metadata_set2(&st->metadata, "variant_bitrate", bitrate_str, + 0); } stream_offset += v->ctx->nb_streams; } |