[FFmpeg-devel] [PATCH] avformat/concatdec: only set output stream index before returning packet

Marton Balint cus at passwd.hu
Sun Mar 25 23:31:54 EEST 2018


Fixes ticket #6434.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/concatdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index 8fff9cc2cb..bbe13136fa 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -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;
 }
 
-- 
2.13.6



More information about the ffmpeg-devel mailing list