diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-09 21:55:54 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-11 02:54:09 +0100 |
commit | 56a67a8d6119d2d113f0f73ee9c8891163ebf3af (patch) | |
tree | 76ba933b7c0c14fc3dd8ac321fe1b9fbdb930281 | |
parent | 26783e857034149bf88bf5718234d5fdf1f3aaec (diff) | |
download | ffmpeg-streaming-56a67a8d6119d2d113f0f73ee9c8891163ebf3af.zip ffmpeg-streaming-56a67a8d6119d2d113f0f73ee9c8891163ebf3af.tar.gz |
asfdec: use an ASFContext array for storing stream bitrates
This will be useful for splitting asf_read_header()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 7c7253802bbb4f7330ff9b32358bf05f9880cbdf)
-rw-r--r-- | libavformat/asfdec.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index ee9bf62..8d79983 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -193,9 +193,6 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) ASFStream *asf_st; int size, i; int64_t gsize; - uint32_t bitrate[128]; - - memset(bitrate, 0, sizeof(bitrate)); ff_get_guid(pb, &g); if (ff_guidcmp(&g, &ff_asf_header)) @@ -532,7 +529,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) payload_ext_ct = get_le16(pb); //payload-extension-system-count if (stream_num < 128) - bitrate[stream_num] = leak_rate; + asf->stream_bitrates[stream_num] = leak_rate; for (i=0; i<stream_ct; i++){ get_le16(pb); @@ -615,7 +612,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) if(stream_num>=0){ AVStream *st = s->streams[stream_num]; if (!st->codec->bit_rate) - st->codec->bit_rate = bitrate[i]; + st->codec->bit_rate = asf->stream_bitrates[i]; if (asf->dar[i].num > 0 && asf->dar[i].den > 0){ av_reduce(&st->sample_aspect_ratio.num, &st->sample_aspect_ratio.den, |