diff mbox

[FFmpeg-devel,1/5] avformat/hlsenc: fix write wrong init file URI string problem

Message ID 20180312063427.13946-1-lq@chinaffmpeg.org
State Accepted
Commit a92ca3c07c89855d46c801ef05428b5d86a1b30c
Headers show

Commit Message

Liu Steven March 12, 2018, 6:34 a.m. UTC
fmp4_init_filename should append after base_output_dirname

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/hlsenc.c | 16 ----------------
 1 file changed, 16 deletions(-)

Comments

James Almer March 12, 2018, 2:24 p.m. UTC | #1
On 3/12/2018 3:34 AM, Steven Liu wrote:
> fmp4_init_filename should append after base_output_dirname
> 
> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>

I'll ask you the same thing i asked Jun Zhao. Please configure git
send-email properly to send patchsets as a single thread.
diff mbox

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 08fe0aa7a0..9c5798b557 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2581,21 +2581,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)
@@ -2622,7 +2607,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) {