Message ID | 20181121155848.201788-2-derek.buitenhuis@gmail.com |
---|---|
State | New |
Headers | show |
On Wed, Nov 21, 2018 at 4:59 PM Derek Buitenhuis <derek.buitenhuis@gmail.com> wrote: > > 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@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]; Format name comparisons are basically always wrong. Don't we have AVFMTCTX_NOHEADER for that? - Hendrik
On 21/11/2018 16:31, Hendrik Leppkes wrote: > Format name comparisons are basically always wrong. Don't we have > AVFMTCTX_NOHEADER for that? I could change it to use that, yeah. I'll send a v2 that does, if the author agrees it's the correct fix. - Derek
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];
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@gmail.com> --- fftools/ffmpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)