[SCM] libav/experimental: rtsp: Return EOF if the TCP control channel is closed

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:14:43 UTC 2013


The following commit has been merged in the experimental branch:
commit 2401660d2f200007d00337a86dc4d88f51a2f3f8
Author: Martin Storsjö <martin at martin.st>
Date:   Wed Aug 25 13:42:17 2010 +0000

    rtsp: Return EOF if the TCP control channel is closed
    
    Originally committed as revision 24920 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 36fe753..c956331 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -797,7 +797,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
             dprintf(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);
 #endif
             if (ret != 1)
-                return -1;
+                return AVERROR_EOF;
             if (ch == '\n')
                 break;
             if (ch == '$') {
@@ -1719,8 +1719,8 @@ redo:
         RTSPMessageHeader reply;
 
         ret = ff_rtsp_read_reply(s, &reply, NULL, 1);
-        if (ret == -1)
-            return -1;
+        if (ret < 0)
+            return ret;
         if (ret == 1) /* received '$' */
             break;
         /* XXX: parse message */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list