dashenc: Simplify code by using a local variable
authorTimo Rothenpieler <timo@rothenpieler.org>
Wed, 4 Mar 2015 21:48:43 +0000 (22:48 +0100)
committerMartin Storsjö <martin@martin.st>
Fri, 6 Mar 2015 08:07:11 +0000 (10:07 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/dashenc.c

index 197af19..6b385ae 100644 (file)
@@ -645,7 +645,7 @@ static int dash_write_header(AVFormatContext *s)
         else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
             c->has_audio = 1;
 
-        set_codec_str(s, os->ctx->streams[0]->codec, os->codec_str, sizeof(os->codec_str));
+        set_codec_str(s, st->codec, os->codec_str, sizeof(os->codec_str));
         os->first_pts = AV_NOPTS_VALUE;
         os->max_pts = AV_NOPTS_VALUE;
         os->segment_index = 1;