avformat/hlsenc: remove the cannot reach result
authorSteven Liu <lq@chinaffmpeg.org>
Sun, 25 Nov 2018 08:28:56 +0000 (16:28 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Sun, 25 Nov 2018 10:35:57 +0000 (18:35 +0800)
fix CID: 1441166
because the logic have checked the vtt_dirname before

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
libavformat/hlsenc.c

index 24b678e..31ef023 100644 (file)
@@ -507,7 +507,7 @@ static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls,
             }
             p = (char *)av_basename(vtt_dirname);
             *p = '\0';
-            sub_path_size = strlen(segment->sub_filename) + 1 + (vtt_dirname ? strlen(vtt_dirname) : 0);
+            sub_path_size = strlen(segment->sub_filename) + 1 + strlen(vtt_dirname);
             sub_path = av_malloc(sub_path_size);
             if (!sub_path) {
                 ret = AVERROR(ENOMEM);