[FFmpeg-cvslog] rtp: Make ff_rtp_codec_id() case insensitive

Wei-Cheng Pan git at videolan.org
Mon Aug 5 22:03:27 CEST 2013


ffmpeg | branch: master | Wei-Cheng Pan <legnaleurc at gmail.com> | Mon Aug  5 19:06:53 2013 +0800| [f646cd44716bf0cba54a1f279dd3d9dd47b33322] | committer: Michael Niedermayer

rtp: Make ff_rtp_codec_id() case insensitive

Fixes handling of lower case pcmu

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/rtp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index c4dcf6a..4d41350 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/avstring.h"
 #include "libavutil/opt.h"
 #include "avformat.h"
 
@@ -144,7 +145,7 @@ enum AVCodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type)
     int i;
 
     for (i = 0; rtp_payload_types[i].pt >= 0; i++)
-        if (!strcmp(buf, rtp_payload_types[i].enc_name) && (codec_type == rtp_payload_types[i].codec_type))
+        if (!av_strcasecmp(buf, rtp_payload_types[i].enc_name) && (codec_type == rtp_payload_types[i].codec_type))
             return rtp_payload_types[i].codec_id;
 
     return AV_CODEC_ID_NONE;



More information about the ffmpeg-cvslog mailing list