diff mbox

[FFmpeg-devel,1/2] avformat/hlsenc: check hls segment mode for ignore the init filename

Message ID 20171101235243.65945-1-lq@chinaffmpeg.org
State Accepted
Commit c52beb4839e030a15b68919b822cb25ad553b9bc
Headers show

Commit Message

Liu Steven Nov. 1, 2017, 11:52 p.m. UTC
ignore the fmp4_init_filename when in normal hls segment mode

Signed-off-by: Steven Liu <lq@onvideo.cn>
---
 libavformat/hlsenc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Steven Liu Nov. 2, 2017, 2:32 p.m. UTC | #1
2017-11-02 7:52 GMT+08:00 Steven Liu <lq@chinaffmpeg.org>:
> ignore the fmp4_init_filename when in normal hls segment mode
>
> Signed-off-by: Steven Liu <lq@onvideo.cn>
> ---
>  libavformat/hlsenc.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 0ea93480a5..6d573db094 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -1443,6 +1443,7 @@ static int hls_write_header(AVFormatContext *s)
>          }
>      }
>
> +    if (hls->segment_type == SEGMENT_TYPE_FMP4) {
>      if (av_strcasecmp(hls->fmp4_init_filename, "init.mp4")) {
>          hls->base_output_dirname = av_malloc(fmp4_init_filename_len);
>          if (!hls->base_output_dirname) {
> @@ -1472,6 +1473,7 @@ static int hls_write_header(AVFormatContext *s)
>              av_strlcpy(hls->base_output_dirname, hls->fmp4_init_filename, fmp4_init_filename_len);
>          }
>      }
> +    }
>
>      if (!hls->use_localtime) {
>          ret = sls_flag_check_duration_size_index(hls);
> --
> 2.11.0 (Apple Git-81)
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

pushed,

Thanks
diff mbox

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 0ea93480a5..6d573db094 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1443,6 +1443,7 @@  static int hls_write_header(AVFormatContext *s)
         }
     }
 
+    if (hls->segment_type == SEGMENT_TYPE_FMP4) {
     if (av_strcasecmp(hls->fmp4_init_filename, "init.mp4")) {
         hls->base_output_dirname = av_malloc(fmp4_init_filename_len);
         if (!hls->base_output_dirname) {
@@ -1472,6 +1473,7 @@  static int hls_write_header(AVFormatContext *s)
             av_strlcpy(hls->base_output_dirname, hls->fmp4_init_filename, fmp4_init_filename_len);
         }
     }
+    }
 
     if (!hls->use_localtime) {
         ret = sls_flag_check_duration_size_index(hls);