diff mbox series

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

Message ID 1620350584-21215-2-git-send-email-lance.lmwang@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/2] avformat: add data_size for ff_hex_to_data()
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Limin Wang May 7, 2021, 1:23 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

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

Comments

Steven Liu May 7, 2021, 4:37 a.m. UTC | #1
> 2021年5月7日 上午9:23,lance.lmwang@gmail.com 写道:
> 
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@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
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe”.
> 
LGTM

Thanks

Steven Liu
diff mbox series

Patch

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;
             }