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

Signed-off-by: Marth64 <mart...@proxyid.net>
---
 libavformat/dvdvideodec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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            ||
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to