mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 20:03:10 +02:00
core: minor audio-only+timeline fix for chapter handling
Remove outdated "!mpctx->sh_video" checks in chapter seeking and naming functions left over from when timeline functionality did not support audio-only case.
This commit is contained in:
parent
8d1e5354e4
commit
c6141b03f4
@ -3487,7 +3487,7 @@ int get_current_chapter(struct MPContext *mpctx)
|
||||
// currently returns a string allocated with malloc, not talloc
|
||||
char *chapter_display_name(struct MPContext *mpctx, int chapter)
|
||||
{
|
||||
if (!mpctx->chapters || !mpctx->sh_video)
|
||||
if (!mpctx->chapters)
|
||||
return demuxer_chapter_display_name(mpctx->demuxer, chapter);
|
||||
return talloc_strdup(NULL, mpctx->chapters[chapter].name);
|
||||
}
|
||||
@ -3496,7 +3496,7 @@ int seek_chapter(struct MPContext *mpctx, int chapter, double *seek_pts,
|
||||
char **chapter_name)
|
||||
{
|
||||
mpctx->last_chapter_seek = -2;
|
||||
if (!mpctx->chapters || !mpctx->sh_video) {
|
||||
if (!mpctx->chapters) {
|
||||
int res = demuxer_seek_chapter(mpctx->demuxer, chapter, seek_pts,
|
||||
chapter_name);
|
||||
if (res >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user