diff mbox

[FFmpeg-devel] avformat/hls: add http 2.0 version number compare for the http_multiple

Message ID 20190604080052.39036-1-lq@chinaffmpeg.org
State Accepted
Commit bee0fba7e69f0cfa32bd588425529dfbcc8c9254
Headers show

Commit Message

Liu Steven June 4, 2019, 8 a.m. UTC
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/hls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 7b29b3f5d1..ab4e7b7d50 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1467,7 +1467,7 @@  reload:
         uint8_t *http_version_opt = NULL;
         int r = av_opt_get(v->input, "http_version", AV_OPT_SEARCH_CHILDREN, &http_version_opt);
         if (r >= 0) {
-            c->http_multiple = strncmp((const char *)http_version_opt, "1.1", 3) == 0;
+            c->http_multiple = (!strncmp((const char *)http_version_opt, "1.1", 3) || !strncmp((const char *)http_version_opt, "2.0", 3));
             av_freep(&http_version_opt);
         }
     }