[FFmpeg-devel] [PATCH 1/2] avformat/rtspdec: show method request in log

Martin Storsjö martin at martin.st
Fri Nov 27 09:26:39 EET 2020


On Thu, 26 Nov 2020, Andriy Gelman wrote:

> From: Andriy Gelman <andriy.gelman at gmail.com>
>
> Signed-off-by: Andriy Gelman <andriy.gelman at gmail.com>
> ---
> libavformat/rtspdec.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
> index 28b35d1993..be11576913 100644
> --- a/libavformat/rtspdec.c
> +++ b/libavformat/rtspdec.c
> @@ -474,6 +474,7 @@ int ff_rtsp_parse_streaming_commands(AVFormatContext *s)
>     ret = read_line(s, rbuf, sizeof(rbuf), &rbuflen);
>     if (ret < 0)
>         return ret;
> +    av_log(s, AV_LOG_TRACE, "Parsing[%d]: %s\n", rbuflen, rbuf);
>     ret = parse_command_line(s, rbuf, rbuflen, uri, sizeof(uri), method,
>                              sizeof(method), &methodcode);
>     if (ret) {
> @@ -675,6 +676,7 @@ static int rtsp_listen(AVFormatContext *s)
>         ret = read_line(s, rbuf, sizeof(rbuf), &rbuflen);
>         if (ret < 0)
>             goto fail;
> +        av_log(s, AV_LOG_TRACE, "Parsing[%d]: %s\n", rbuflen, rbuf);
>         ret = parse_command_line(s, rbuf, rbuflen, uri, sizeof(uri), method,
>                                  sizeof(method), &methodcode);
>         if (ret) {
> -- 
> 2.28.0

LGTM, if the log level matches what's used for similar log messages 
elsewhere in the rtsp code.

// Martin



More information about the ffmpeg-devel mailing list