From af3dee313223c722c34e8231cd6859188928a6e3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 31 Oct 2025 16:17:27 +0100 Subject: [PATCH] avformat/rtpdec_rfc4175: Fix memleak of sampling Reviewed-by: Joshua Rogers Signed-off-by: Michael Niedermayer --- libavformat/rtpdec_rfc4175.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtpdec_rfc4175.c b/libavformat/rtpdec_rfc4175.c index d6260ab69e..c41e4f19e0 100644 --- a/libavformat/rtpdec_rfc4175.c +++ b/libavformat/rtpdec_rfc4175.c @@ -128,7 +128,7 @@ static int rfc4175_parse_fmtp(AVFormatContext *s, AVStream *stream, data->width = atoi(value); else if (!strncmp(attr, "height", 6)) data->height = atoi(value); - else if (!strncmp(attr, "sampling", 8)) + else if (data->sampling == NULL && !strncmp(attr, "sampling", 8)) data->sampling = av_strdup(value); else if (!strncmp(attr, "depth", 5)) data->depth = atoi(value);