diff mbox series

[FFmpeg-devel,v2,2/2] avformat/hlsenc: deprecate hls_ts_options option

Message ID 20211118065855.17159-2-lq@chinaffmpeg.org
State Accepted
Commit 6cf55b9da2b41d5c2b8a0b6e4405dd84858cae35
Headers show
Series [FFmpeg-devel,v2,1/2] avformat/hlsenc: add hls_segment_options correct the segment options name | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Liu Steven Nov. 18, 2021, 6:58 a.m. UTC
Because the hls_ts_options will be misunderstand by user,
and then user can use hls_segment_options instead of hls_ts_options.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 doc/muxers.texi       | 1 +
 libavformat/hlsenc.c  | 4 +++-
 libavformat/version.h | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 287ea569fd..1ea98a69a3 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -799,6 +799,7 @@  were recently referenced in the playlist. Default value is 1, meaning segments o
 Set output format options using a :-separated list of key=value
 parameters. Values containing @code{:} special characters must be
 escaped.
+@code{hls_ts_options} is deprecated, use hls_segment_options instead of it..
 
 @item hls_start_number_source
 Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source.
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index fb261acc93..1be5bdf451 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -3101,7 +3101,9 @@  static const AVOption options[] = {
     {"hls_init_time", "set segment length at init list",         OFFSET(init_time),     AV_OPT_TYPE_DURATION, {.i64 = 0},       0, INT64_MAX, E},
     {"hls_list_size", "set maximum number of playlist entries",  OFFSET(max_nb_segments),    AV_OPT_TYPE_INT,    {.i64 = 5},     0, INT_MAX, E},
     {"hls_delete_threshold", "set number of unreferenced segments to keep before deleting",  OFFSET(hls_delete_threshold),    AV_OPT_TYPE_INT,    {.i64 = 1},     1, INT_MAX, E},
-    {"hls_ts_options","set hls mpegts list of options for the container format used for hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL},  0, 0,    E},
+#if FF_HLS_TS_OPTIONS
+    {"hls_ts_options","set hls mpegts list of options for the container format used for hls (deprecated, use hls_segment_options instead of it.)", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL},  0, 0,    E | AV_OPT_FLAG_DEPRECATED},
+#endif
     {"hls_vtt_options","set hls vtt list of options for the container format used for hls", OFFSET(vtt_format_options_str), AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,    E},
     {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, E},
     {"hls_base_url",  "url to prepend to each playlist entry",   OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,       E},
diff --git a/libavformat/version.h b/libavformat/version.h
index ae2b873197..9c41a300e9 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -58,6 +58,7 @@ 
 #define FF_API_LAVF_PRIV_OPT            (LIBAVFORMAT_VERSION_MAJOR < 60)
 #define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 60)
 #define FF_API_AVIOCONTEXT_WRITTEN      (LIBAVFORMAT_VERSION_MAJOR < 60)
+#define FF_HLS_TS_OPTIONS               (LIBAVFORMAT_VERSION_MAJOR < 60)
 #define FF_API_AVSTREAM_CLASS           (LIBAVFORMAT_VERSION_MAJOR > 59)