[FFmpeg-cvslog] avformat/hlsenc: fix write wrong init file URI string problem

Steven Liu git at videolan.org
Sun Mar 18 13:06:09 EET 2018


ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Sun Mar 18 14:07:00 2018 +0800| [a92ca3c07c89855d46c801ef05428b5d86a1b30c] | committer: Steven Liu

avformat/hlsenc: fix write wrong init file URI string problem

fmp4_init_filename should append after base_output_dirname

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a92ca3c07c89855d46c801ef05428b5d86a1b30c
---

 libavformat/hlsenc.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 58d403d3fa..3df0784146 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2583,21 +2583,6 @@ static int hls_init(AVFormatContext *s)
             }
             av_strlcpy(vs->fmp4_init_filename, hls->fmp4_init_filename,
                        fmp4_init_filename_len);
-
-            if (av_strcasecmp(hls->fmp4_init_filename, "init.mp4")) {
-                ret = format_name(vs->fmp4_init_filename, fmp4_init_filename_len, i);
-                if (ret < 0)
-                    goto fail;
-
-                fmp4_init_filename_len = strlen(vs->fmp4_init_filename) + 1;
-                vs->base_output_dirname = av_malloc(fmp4_init_filename_len);
-                if (!vs->base_output_dirname) {
-                    ret = AVERROR(ENOMEM);
-                    goto fail;
-                }
-                av_strlcpy(vs->base_output_dirname, vs->fmp4_init_filename,
-                           fmp4_init_filename_len);
-            } else {
                 if (hls->nb_varstreams > 1) {
                     ret = append_postfix(vs->fmp4_init_filename, fmp4_init_filename_len, i);
                     if (ret < 0)
@@ -2624,7 +2609,6 @@ static int hls_init(AVFormatContext *s)
                     av_strlcpy(vs->base_output_dirname, vs->fmp4_init_filename,
                                fmp4_init_filename_len);
                 }
-            }
         }
 
         if (!hls->use_localtime) {



More information about the ffmpeg-cvslog mailing list