This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit da821ec3169d708dc878f091d191efcf7ca438ae
Author:     Marvin Scholz <[email protected]>
AuthorDate: Fri Oct 10 17:55:17 2025 +0200
Commit:     Marvin Scholz <[email protected]>
CommitDate: Thu Feb 19 17:18:12 2026 +0100

    avformat: rtspdec: use stored replies for SET_PARAMETER command
    
    Makes the reply reading completely non-blocking and reliably reports
    the reply even when interleaved packets are read.
---
 libavformat/rtspdec.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index c7647f8b97..97bb4f23ae 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -653,8 +653,8 @@ static int rtsp_submit_command(struct AVFormatContext *s, 
enum AVFormatCommandID
     av_log(s, AV_LOG_DEBUG, "Sending SET_PARAMETER command to %s\n", 
rt->control_uri);
     char *headers = dict_to_headers(req->headers);
 
-    int ret = ff_rtsp_send_cmd_with_content_async(s, "SET_PARAMETER", 
rt->control_uri,
-        headers, req->body, req->body_len);
+    int ret = ff_rtsp_send_cmd_with_content_async_stored(s, "SET_PARAMETER",
+        rt->control_uri, headers, req->body, req->body_len);
     av_free(headers);
 
     if (ret != 0)
@@ -667,7 +667,6 @@ static int rtsp_read_command_reply(AVFormatContext *s, enum 
AVFormatCommandID id
 {
     if (id != AVFORMAT_COMMAND_RTSP_SET_PARAMETER)
         return AVERROR(ENOTSUP);
-
     if (!data_out)
         return AVERROR(EINVAL);
 
@@ -675,19 +674,19 @@ static int rtsp_read_command_reply(AVFormatContext *s, 
enum AVFormatCommandID id
     if (!res)
         return AVERROR(ENOMEM);
 
-    RTSPMessageHeader reply;
-    int ret = ff_rtsp_read_reply(s, &reply, &res->body, 1, "SET_PARAMETER");
+    RTSPMessageHeader *reply;
+    int ret = ff_rtsp_read_reply_async_stored(s, &reply, &res->body);
     if (ret < 0)
         return ret;
-    if (ret == 1)
-        return AVERROR(EAGAIN);
 
-    res->status_code = reply.status_code;
-    res->body_len = reply.content_length;
+    res->status_code = reply->status_code;
+    res->body_len = reply->content_length;
 
-    res->reason = av_strdup(reply.reason);
+    res->reason = av_strdup(reply->reason);
     if (!res->reason) {
+        av_free(res->body);
         av_free(res);
+        av_free(reply);
         return AVERROR(ENOMEM);
     }
 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to