[FFmpeg-devel] [PATCH] avformat/dvdvideodec: Fix duration logic with 1 chapter and validate chapter range

Stefano Sabatini stefasab at gmail.com
Mon Jul 1 23:49:42 EEST 2024


On date Wednesday 2024-06-26 22:05:46 -0500, Marth64 wrote:
> Chapters and duration are calculated together in dvdvideo demuxer.
> Previous chapter calculation logic treated extraction of 1 chapter
> using chapter_start and chapter_end switches incorrectly, returning
> the duration of the entire title instead of just the segment.
> 

> Fix the logic so that it calculates and returns the duration of the
> chapter segment instead. Additionally, validate that chapter_end
> exceeds chapter_start (except in the special case of 0).

What is the meaning of the 0 special case?

> 
> Signed-off-by: Marth64 <marth64 at proxyid.net>
> ---
>  libavformat/dvdvideodec.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)

[...]

Looks good to me.


More information about the ffmpeg-devel mailing list