Browse Source

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>
tags/n0.8
Martin Storsjö 14 years ago
parent
commit
5f85d49b68
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/applehttp.c

+ 3
- 1
libavformat/applehttp.c View File

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


Loading…
Cancel
Save