[FFmpeg-cvslog] avformat/dashenc: enabling streaming and hls_playlist for lhls

Zhao Zhili git at videolan.org
Fri Nov 5 20:35:28 EET 2021


ffmpeg | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Thu Oct 21 16:15:31 2021 +0800| [a0f9650046842249233b54b1f9b4aaf03dacf0a7] | committer: James Almer

avformat/dashenc: enabling streaming and hls_playlist for lhls

Try to make the feature easier to use, especially since the user
have enabled -strict experimental manually. The user shouldn't
be surprised that hls_playlist is enabled for lhls automatically,
so change the log level from warning to info for that.

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

 doc/muxers.texi       | 2 +-
 libavformat/dashenc.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 7338e8d5d3..8febbd58bf 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -365,7 +365,7 @@ Enable Low-latency HLS(LHLS). Adds #EXT-X-PREFETCH tag with current segment's UR
 Apple doesn't have an official spec for LHLS. Meanwhile hls.js player folks are
 trying to standardize a open LHLS spec. The draft spec is available in https://github.com/video-dev/hlsjs-rfcs/blob/lhls-spec/proposals/0001-lhls.md
 This option will also try to comply with the above open spec, till Apple's spec officially supports it.
-Applicable only when @var{streaming} and @var{hls_playlist} options are enabled.
+It enables @var{streaming} and @var{hls_playlist} options automatically.
 This is an experimental feature.
 
 @item ldash @var{ldash}
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index f9ec43689d..5faf06e11d 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1396,13 +1396,13 @@ static int dash_init(AVFormatContext *s)
     }
 
     if (c->lhls && !c->streaming) {
-        av_log(s, AV_LOG_WARNING, "LHLS option will be ignored as streaming is not enabled\n");
-        c->lhls = 0;
+        av_log(s, AV_LOG_WARNING, "Enabling streaming as LHLS is enabled\n");
+        c->streaming = 1;
     }
 
     if (c->lhls && !c->hls_playlist) {
-        av_log(s, AV_LOG_WARNING, "LHLS option will be ignored as hls_playlist is not enabled\n");
-        c->lhls = 0;
+        av_log(s, AV_LOG_INFO, "Enabling hls_playlist as LHLS is enabled\n");
+        c->hls_playlist = 1;
     }
 
     if (c->ldash && !c->streaming) {



More information about the ffmpeg-cvslog mailing list