diff mbox series

[FFmpeg-devel,3/4] avformat/dvenc: s->streams[i] -> st

Message ID 1604969916-3030-3-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit da0faf10a3d426748ac8722db3ea93358f95a351
Headers show
Series [FFmpeg-devel,1/4] avfilter/vf_fade: simplify code to use pts timebase for time check | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Limin Wang Nov. 10, 2020, 12:58 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavformat/dvenc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index b04d604..1c38673 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -307,14 +307,15 @@  static DVMuxContext* dv_init_mux(AVFormatContext* s)
 
     /* We have to sort out where audio and where video stream is */
     for (i=0; i<s->nb_streams; i++) {
-        switch (s->streams[i]->codecpar->codec_type) {
+        AVStream *st = s->streams[i];
+        switch (st->codecpar->codec_type) {
         case AVMEDIA_TYPE_VIDEO:
             if (vst) return NULL;
-            vst = s->streams[i];
+            vst = st;
             break;
         case AVMEDIA_TYPE_AUDIO:
             if (c->n_ast > 1) return NULL;
-            c->ast[c->n_ast++] = s->streams[i];
+            c->ast[c->n_ast++] = st;
             break;
         default:
             goto bail_out;