concatdec: fix file_start_time calculation regression
authorMarton Balint <cus@passwd.hu>
Tue, 13 Oct 2015 20:56:00 +0000 (22:56 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 17 Oct 2015 20:36:33 +0000 (22:36 +0200)
Fixes ticket #4924.

Found-by: Jaroslav Ć najdr <jsnajdr@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit df239b76195156f179618ddb8b167d5bf1245247)

libavformat/concatdec.c

index 88b6dbe..be5cece 100644 (file)
@@ -314,7 +314,7 @@ static int open_file(AVFormatContext *avf, unsigned fileno)
         file->start_time = !fileno ? 0 :
                            cat->files[fileno - 1].start_time +
                            cat->files[fileno - 1].duration;
-    file->file_start_time = (avf->start_time == AV_NOPTS_VALUE) ? 0 : avf->start_time;
+    file->file_start_time = (cat->avf->start_time == AV_NOPTS_VALUE) ? 0 : cat->avf->start_time;
     file->file_inpoint = (file->inpoint == AV_NOPTS_VALUE) ? file->file_start_time : file->inpoint;
     if ((ret = match_streams(avf)) < 0)
         return ret;