diff mbox

[FFmpeg-devel] lavf/rpl: Don't be case-sensitive detecting codecs

Message ID CAB0OVGoxZW2WR1o9+Jei3BX0_0X9NUQk74M7MY7Dn_pvfx0BEQ@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos May 5, 2019, 2:35 p.m. UTC
Hi!

Attached patch fixes ticket #7859.

Please comment, Carl Eugen

Comments

Paul B Mahol May 5, 2019, 4:29 p.m. UTC | #1
On 5/5/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> Hi!
>
> Attached patch fixes ticket #7859.
>
> Please comment, Carl Eugen
>

ok
Carl Eugen Hoyos May 5, 2019, 6:32 p.m. UTC | #2
Am So., 5. Mai 2019 um 18:29 Uhr schrieb Paul B Mahol <onemda@gmail.com>:
>
> On 5/5/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> > Hi!
> >
> > Attached patch fixes ticket #7859.
> >
> > Please comment, Carl Eugen
> >
>
> ok

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

From 3e5f467c050c3ca0eb1bb5ad65cc1108029886e8 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sun, 5 May 2019 16:32:11 +0200
Subject: [PATCH] lavf/rpl: Don't be case-sensitive detecting codecs.

Fixes ticket #7859
Reported and tested by Steffen Ohrendorf, steffen d ohrendorf a gmx d de
---
 libavformat/rpl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index fa6357666a..7aec3503da 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -210,10 +210,10 @@  static int rpl_read_header(AVFormatContext *s)
                     ast->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE;
                     break;
                 } else if (ast->codecpar->bits_per_coded_sample == 8) {
-                    if(strstr(audio_type, "unsigned") != NULL) {
+                    if(av_strcasecmp(audio_type, "unsigned") >= 0) {
                         ast->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
                         break;
-                    } else if(strstr(audio_type, "linear") != NULL) {
+                    } else if(av_strcasecmp(audio_type, "linear") >= 0) {
                         ast->codecpar->codec_id = AV_CODEC_ID_PCM_S8;
                         break;
                     } else {
-- 
2.21.0