[FFmpeg-devel] [PATCH] avformat/hlsenc: Duplicated segment filenames and use_localtime_mkdir

Steven Liu lingjiujianke at gmail.com
Sun Jan 1 13:57:28 EET 2017


2017-01-01 19:40 GMT+08:00 Bodecs Bela <bodecsb at vivanet.hu>:

> Dear All,
>
> current implementation of finding duplicated segment filenames may fail if
> use_localtime_mkdir and use_localtime are in effect and segment_filename
> option expression contains subdirectories with date/time specifiers in them.
> This patch fixes this false behaviour.
>
>
> thank you,
>
> Bela
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>

+static HLSSegment *find_segment_by_filename(HLSSegment *segment, const
char *filename)
+{
+    while (segment) {
+        if (!strcmp(segment->filename,filename))
+            return segment;
+        segment = segment->next;
+    }
+    return (HLSSegment *) NULL;
+}
+
use av_strcasecmp will better。


More information about the ffmpeg-devel mailing list