summaryrefslogtreecommitdiffstats
path: root/demux/demux_timeline.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-11-09 16:25:59 +0100
committerwm4 <wm4@nowhere>2016-11-09 16:44:06 +0100
commitb787a4121ad50f0e069863b96fda7d950175114e (patch)
tree528d5fd72f03ab8dbec7d61543196b6bedd41e11 /demux/demux_timeline.c
parentadf65634d85c3c881268687025e39706046d7535 (diff)
downloadmpv-b787a4121ad50f0e069863b96fda7d950175114e.tar.bz2
mpv-b787a4121ad50f0e069863b96fda7d950175114e.tar.xz
demux_timeline: always signal new segment after a seek
This is needed to put the decoders into the correct state. In particular, decoders will not initialize the current segment without this flag. The intention of not setting the flag for seeks within the segments were to avoid costly decoder reinits, but it seems this is better handled explicitly in the decoder wrappers.
Diffstat (limited to 'demux/demux_timeline.c')
-rw-r--r--demux/demux_timeline.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c
index a7024fef16..8784dcf8f6 100644
--- a/demux/demux_timeline.c
+++ b/demux/demux_timeline.c
@@ -93,7 +93,6 @@ static void switch_segment(struct demuxer *demuxer, struct segment *new,
double start_pts, int flags)
{
struct priv *p = demuxer->priv;
- bool new_segment = p->current != new;
if (!(flags & (SEEK_FORWARD | SEEK_BACKWARD)))
flags |= SEEK_BACKWARD | SEEK_HR;
@@ -107,8 +106,7 @@ static void switch_segment(struct demuxer *demuxer, struct segment *new,
for (int n = 0; n < p->num_streams; n++) {
struct virtual_stream *vs = &p->streams[n];
- if (new_segment)
- vs->new_segment = true;
+ vs->new_segment = true;
vs->eos_packets = 0;
}