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

Carl Eugen Hoyos git at videolan.org
Sun May 5 21:31:24 EEST 2019


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sun May  5 16:32:11 2019 +0200| [8cf5f948f24aef163fc57c3115440ef2d9c6cfd9] | committer: Carl Eugen Hoyos

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

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

 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 {



More information about the ffmpeg-cvslog mailing list