diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2015-03-01 22:59:55 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-02 21:40:26 +0100 |
commit | b86af8da3100a7eef3247747cd469b988f134e0d (patch) | |
tree | 7170be9db37e87c3407720d88c5b08f0756afbe9 | |
parent | f5cbb2c55e19340ba5257a9c7d33d3d4d2880263 (diff) | |
download | ffmpeg-b86af8da3100a7eef3247747cd469b988f134e0d.tar.gz |
avformat/dashenc: Use local variable instead of duplicated dereferences
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/dashenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 98036d3fec..a6792c1957 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -498,7 +498,8 @@ static int write_manifest(AVFormatContext *s, int final) for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; OutputStream *os = &c->streams[i]; - if (s->streams[i]->codec->codec_type != AVMEDIA_TYPE_VIDEO) + + if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO) continue; avio_printf(out, "\t\t\t<Representation id=\"%d\" mimeType=\"video/mp4\" codecs=\"%s\"%s width=\"%d\" height=\"%d\">\n", i, os->codec_str, os->bandwidth_str, st->codec->width, st->codec->height); output_segment_list(&c->streams[i], out, c); @@ -511,7 +512,8 @@ static int write_manifest(AVFormatContext *s, int final) for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; OutputStream *os = &c->streams[i]; - if (s->streams[i]->codec->codec_type != AVMEDIA_TYPE_AUDIO) + + if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO) continue; avio_printf(out, "\t\t\t<Representation id=\"%d\" mimeType=\"audio/mp4\" codecs=\"%s\"%s audioSamplingRate=\"%d\">\n", i, os->codec_str, os->bandwidth_str, st->codec->sample_rate); avio_printf(out, "\t\t\t\t<AudioChannelConfiguration schemeIdUri=\"urn:mpeg:dash:23003:3:audio_channel_configuration:2011\" value=\"%d\" />\n", st->codec->channels); |