[FFmpeg-devel] [PATCH] avformat/hlsenc: fix handling of delete_segments when %v is present

Steven Liu lq at chinaffmpeg.org
Wed Apr 11 07:03:46 EEST 2018



> On 6 Apr 2018, at 18:27, Bodecs Bela <bodecsb at vivanet.hu> wrote:
> 
> Dear All,
> 
> when var_stream_map option is used, %v must appear either in segment name template or in the directory path. This latter case currently is not handled and using delete_segments flag of hls_flags is broken now. This patch fixes this issue.
> The root cause of the bug was that HLSSegment struct only stores the final filename part, but not the final directory path. Most of the cases, final path info is unneded, It only necessary when you want to delete old segments (e.g in case of live streaming).
> Without variant streams it was unnecessary to store the final directory path, because all segment were stored into the same directory. But introducing %v in directory names either require to store the final directory path into HLSSegment or associate segments with their variant streams to be able deleting them later. I have choosen the second solution and introduced a variant index data member into the segment struct.
> 
> please review this patch.
> 
> thank you in advance,
> 
> Bela Bodecs
> 
> 
> <0001-avformat-hlsenc-fix-handling-of-delete_segments-when.patch>_______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
pushed

Thanks
Steven







More information about the ffmpeg-devel mailing list