[FFmpeg-devel] [PATCH] avformat/rtsp: Fix server compatibility issues with rtspclientsink GStreamer plugin

Michael Niedermayer michael at niedermayer.cc
Thu Dec 28 21:33:29 EET 2023


On Wed, Dec 27, 2023 at 03:44:09PM +0200, Paul Orlyk wrote:
> mode field in Transport header can be sent in upper case so make string
> comparison case insensitive.
> Also, GStreamer expects to see mode=record instead of mode=receive in
> Transport header in response.
> 
> Signed-off-by: Paul Orlyk <paul.orlyk at gmail.com>
> ---
>  libavformat/rtsp.c    | 4 ++--
>  libavformat/rtspdec.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> index 583f5338e8..61e24a5c7a 100644
> --- a/libavformat/rtsp.c
> +++ b/libavformat/rtsp.c
> @@ -1012,8 +1012,8 @@ static void rtsp_parse_transport(AVFormatContext *s,
>                  if (*p == '=') {
>                      p++;
>                      get_word_sep(buf, sizeof(buf), ";, ", &p);
> -                    if (!strcmp(buf, "record") ||
> -                        !strcmp(buf, "receive"))
> +                    if (!av_strcasecmp(buf, "record") ||
> +                        !av_strcasecmp(buf, "receive"))
>                          th->mode_record = 1;
>                  }
>              }
> diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
> index 39fd92fb66..d6a223cbc6 100644
> --- a/libavformat/rtspdec.c
> +++ b/libavformat/rtspdec.c
> @@ -303,7 +303,7 @@ static int rtsp_read_setup(AVFormatContext *s, char*
> host, char *controlurl)
>          rtsp_st->interleaved_min = request.transports[0].interleaved_min;

patch is damaged by linebreaks


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231228/26829499/attachment.sig>


More information about the ffmpeg-devel mailing list