avformat/concatdec: only set output stream index before returning packet
authorMarton Balint <cus@passwd.hu>
Sun, 25 Mar 2018 20:19:28 +0000 (22:19 +0200)
committerMarton Balint <cus@passwd.hu>
Mon, 2 Apr 2018 18:41:53 +0000 (20:41 +0200)
Fixes ticket #6434.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/concatdec.c

index 8fff9cc..bbe1313 100644 (file)
@@ -603,7 +603,6 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
             av_packet_unref(pkt);
             continue;
         }
-        pkt->stream_index = cs->out_stream_index;
         break;
     }
     if ((ret = filter_packet(avf, cs, pkt)))
@@ -646,6 +645,7 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
         }
     }
 
+    pkt->stream_index = cs->out_stream_index;
     return ret;
 }