[FFmpeg-devel] [PATCH 2/2] avformat/hls: use av_strncasecmp()

lance.lmwang at gmail.com lance.lmwang at gmail.com
Fri May 7 04:23:04 EEST 2021


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavformat/hls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index c7f9f06..9610b83 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -799,7 +799,7 @@ static int parse_playlist(HLSContext *c, const char *url,
                 key_type = KEY_AES_128;
             if (!strcmp(info.method, "SAMPLE-AES"))
                 key_type = KEY_SAMPLE_AES;
-            if (!strncmp(info.iv, "0x", 2) || !strncmp(info.iv, "0X", 2)) {
+            if (!av_strncasecmp(info.iv, "0x", 2)) {
                 ff_hex_to_data(iv, sizeof(iv), info.iv + 2);
                 has_iv = 1;
             }
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list