[FFmpeg-devel] [PATCH 1/3] fftools/ffmpeg: Don't mangle start time based on discontinuities for FLV

Derek Buitenhuis derek.buitenhuis at gmail.com
Wed Nov 21 17:58:46 EET 2018


As far as I can tell, this isn't valid here sicne FLV may not have added
streams yet.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 fftools/ffmpeg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index a12208cce9..3bc42c8ca8 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4373,7 +4373,8 @@ static int process_input(int file_index)
         //       so we instead do it here as part of discontinuity handling
         if (   ist->next_dts == AV_NOPTS_VALUE
             && ifile->ts_offset == -is->start_time
-            && (is->iformat->flags & AVFMT_TS_DISCONT)) {
+            && ((is->iformat->flags & AVFMT_TS_DISCONT)
+                && !!strcmp(is->iformat->name, "flv"))) {
             int64_t new_start_time = INT64_MAX;
             for (i=0; i<is->nb_streams; i++) {
                 AVStream *st = is->streams[i];
-- 
2.19.1



More information about the ffmpeg-devel mailing list