[FFmpeg-devel] [PATCH 3/3] lavf/segment: add option to write empty filler segments as needed

Stefano Sabatini stefasab at gmail.com
Sat Apr 2 12:28:57 CEST 2016


On date Friday 2016-03-25 15:22:56 -0500, Rodger Combs encoded:
> 
> > On Mar 25, 2016, at 10:17, Stefano Sabatini <stefasab at gmail.com> wrote:
> > 
> > Can you describe an use case for this (and possibly add a short
> > description in the log)?
> 
> This is mostly useful when writing segmented subtitles (e.g. WebVTT in HLS). If there's a gap in the subtitles, you need empty segments between them.
> I'll add an explanation in the commit message.
> 
> > 
> >> +        if (seg->times || (!seg->frames && !seg->use_clocktime) && seg->write_empty)
> >> +            goto calc_times;
> > 
> > what's the point of this goto?
> 
> This causes us to re-run the time check and segment-breaking code,
> so we can advance by multiple segments while processing a single
> packet (all but the last one being left empty).

Makes sens. LGTM if tested, thanks.
-- 
FFmpeg = Fanciful and Frenzy Mere Powerful Elastic Guru


More information about the ffmpeg-devel mailing list