[FFmpeg-devel] 'UDP' protocol (in upper case) in SDP m= section was parsed correctly

Submitted by Yannick Poirier on Jan. 30, 2019, 3:57 p.m.

Details

Message ID 20190130155717.29166-1-yannick.poirier@inverto.tv
State New
Headers show

Commit Message

Yannick Poirier Jan. 30, 2019, 3:57 p.m.
---
 libavformat/rtsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Carl Eugen Hoyos Jan. 30, 2019, 11:24 p.m.
2019-01-30 16:57 GMT+01:00, Yannick Poirier <yannick.poirier@inverto.tv>:
> ---
>  libavformat/rtsp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> index ceb770a3a4..4899e4e790 100644
> --- a/libavformat/rtsp.c
> +++ b/libavformat/rtsp.c
> @@ -480,7 +480,7 @@ static void sdp_parse_line(AVFormatContext *s,
> SDPParseState *s1,
>          rtsp_st->sdp_port = atoi(buf1);
>
>          get_word(buf1, sizeof(buf1), &p); /* protocol */
> -        if (!strcmp(buf1, "udp"))
> +        if (!av_strcasecmp(buf1, "udp"))

Is there an rfc or similar that supports this?

In any case, the commit message can be improved.

Carl Eugen

Patch hide | download patch | download mbox

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index ceb770a3a4..4899e4e790 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -480,7 +480,7 @@  static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
         rtsp_st->sdp_port = atoi(buf1);
 
         get_word(buf1, sizeof(buf1), &p); /* protocol */
-        if (!strcmp(buf1, "udp"))
+        if (!av_strcasecmp(buf1, "udp"))
             rt->transport = RTSP_TRANSPORT_RAW;
         else if (strstr(buf1, "/AVPF") || strstr(buf1, "/SAVPF"))
             rtsp_st->feedback = 1;