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

Git pushed a commit to branch release/7.1
in repository ffmpeg.

commit 5f40afe429e194ebbccd49c55cdb102b54edfc4c
Author:     Marvin Scholz <[email protected]>
AuthorDate: Fri Aug 22 16:50:34 2025 +0200
Commit:     Marvin Scholz <[email protected]>
CommitDate: Tue Dec 9 15:14:05 2025 +0000

    avformat/rtsp: do not log invalid values
    
    When reading fails the first time, ch would be uninitialized and
    printed in the log message. Instead check for an error early and
    log it properly.
    
    (cherry picked from commit 2ed47ab72509bbee60288d245a0aebb7eb05e41a)
    Signed-off-by: Marvin Scholz <[email protected]>
---
 libavformat/rtsp.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 5ea471b40c..5e63383b68 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1205,9 +1205,12 @@ start:
         q = buf;
         for (;;) {
             ret = ffurl_read_complete(rt->rtsp_hd, &ch, 1);
+            if (ret != 1) {
+                ret = (ret < 0) ? ret : AVERROR(EIO);
+                av_log(s, AV_LOG_WARNING, "Failed reading RTSP data: %s\n", 
av_err2str(ret));
+                return ret;
+            }
             av_log(s, AV_LOG_TRACE, "ret=%d c=%02x [%c]\n", ret, ch, ch);
-            if (ret != 1)
-                return ret < 0 ? ret : AVERROR(EIO);
             if (ch == '\n')
                 break;
             if (ch == '$' && q == buf) {

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

Reply via email to