Skip to content

Commit cef62fb

Browse files
committed
player/command: reset playback state of edition changes
When changing MPEG-TS program (edition) it may have completelly different time base and duration, on live, non-seekable streams we would just hang trying to resync to revious PTS, which is not valid. Reset the state on edition change.
1 parent 7f93b06 commit cef62fb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

player/command.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8389,6 +8389,10 @@ void mp_option_run_callback(struct MPContext *mpctx, struct mp_option_callback *
83898389
mp_switch_track_n(mpctx, i, t, sel, 0);
83908390
}
83918391
}
8392+
if (demuxer->ts_resets_possible) {
8393+
reset_playback_state(mpctx);
8394+
demux_flush(demuxer);
8395+
}
83928396
mp_notify_property(mpctx, "current-edition");
83938397
print_track_list(mpctx,
83948398
mp_tprintf(42, "Selected edition %d:", demuxer->edition));

0 commit comments

Comments
 (0)