aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarth64 <marth64@proxyid.net>2024-11-26 20:09:04 -0600
committerMarth64 <marth64@proxyid.net>2024-12-01 13:48:45 -0600
commita5a899bfcbe458bc9e4e73f883ed63cbaacbb451 (patch)
treec1d0cd34ebe1267f1ac742cb37f2b4dc0d58778f
parent1e3dc705dfb9546f0f7ff4479d20baeb4bdb6187 (diff)
downloadffmpeg-a5a899bfcbe458bc9e4e73f883ed63cbaacbb451.tar.gz
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. Signed-off-by: Marth64 <marth64@proxyid.net>
-rw-r--r--libavformat/dvdvideodec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index 4d11480dfd..9916351e86 100644
--- a/libavformat/dvdvideodec.c
+++ b/libavformat/dvdvideodec.c
@@ -874,7 +874,7 @@ static int dvdvideo_chapters_setup_simple(AVFormatContext *s)
int64_t total_duration = 0;
int chapter_start = c->opt_chapter_start;
- int chapter_end = c->opt_chapter_end > 0 ? c->opt_chapter_end : c->play_state.pgc_nb_pg_est - 1;
+ int chapter_end = c->opt_chapter_end > 0 ? c->opt_chapter_end : c->play_state.pgc_nb_pg_est;
/* dvdnav_describe_title_chapters() describes PGs rather than PTTs, so validate our range */
if (c->play_state.pgc_nb_pg_est == 1 ||