summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_lavf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index e28ebd0c23..ef0a8583d5 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -114,6 +114,7 @@ struct format_hack {
// Do not confuse player's position estimation (position is into external
// segment, with e.g. HLS, player knows about the playlist main file only).
bool clear_filepos : 1;
+ bool ignore_start : 1;
};
#define BLACKLIST(fmt) {fmt, .ignore = true}
@@ -137,6 +138,9 @@ static const struct format_hack format_hacks[] = {
{"h264", .if_flags = AVFMT_NOTIMESTAMPS },
{"hevc", .if_flags = AVFMT_NOTIMESTAMPS },
+ // Rebasing start time to 0 is very weird with ogg shoutcast streams.
+ {"ogg", .ignore_start = true},
+
TEXTSUB("aqtitle"), TEXTSUB("jacosub"), TEXTSUB("microdvd"),
TEXTSUB("mpl2"), TEXTSUB("mpsub"), TEXTSUB("pjs"), TEXTSUB("realtext"),
TEXTSUB("sami"), TEXTSUB("srt"), TEXTSUB("stl"), TEXTSUB("subviewer"),
@@ -855,8 +859,8 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check)
demuxer->ts_resets_possible =
priv->avif_flags & (AVFMT_TS_DISCONT | AVFMT_NOTIMESTAMPS);
- demuxer->start_time = priv->avfc->start_time == AV_NOPTS_VALUE ?
- 0 : (double)priv->avfc->start_time / AV_TIME_BASE;
+ if (avfc->start_time != AV_NOPTS_VALUE && !priv->format_hack.ignore_start)
+ demuxer->start_time = avfc->start_time / (double)AV_TIME_BASE;
demuxer->fully_read = priv->format_hack.fully_read;