History

avformat/dvdvideodec: fix missing last chapter marker due to off-by-one

When using fast chapter marker calculation (default), the last marker is inadverdently ignored due to an off-by-one.

Marth64 committed 1 year ago

Commit a5a899b1 parent 1e3dc701 file · +1 −1Browse files

Unified · Split

libavformat/dvdvideodec.c+1−1
@@ -874,7 +874,7 @@ static int dvdvideo_chapters_setup_simple(AVFormatContext *s) · 873 unmodified lines
874 int64_t total_duration = 0;874 int64_t total_duration = 0;
875 875
876 int chapter_start = c->opt_chapter_start;876 int chapter_start = c->opt_chapter_start;
877 int chapter_end = c->opt_chapter_end > 0 ? c->opt_chapter_end : c->play_state.pgc_nb_pg_est - 1;877 int chapter_end = c->opt_chapter_end > 0 ? c->opt_chapter_end : c->play_state.pgc_nb_pg_est;
878 878
879 /* dvdnav_describe_title_chapters() describes PGs rather than PTTs, so validate our range */879 /* dvdnav_describe_title_chapters() describes PGs rather than PTTs, so validate our range */
880 if (c->play_state.pgc_nb_pg_est == 1 ||880 if (c->play_state.pgc_nb_pg_est == 1 ||

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t