[FFmpeg-cvslog] r24920 - trunk/libavformat/rtsp.c

mstorsjo subversion
Wed Aug 25 15:42:17 CEST 2010


Author: mstorsjo
Date: Wed Aug 25 15:42:17 2010
New Revision: 24920

Log:
rtsp: Return EOF if the TCP control channel is closed

Modified:
   trunk/libavformat/rtsp.c

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Wed Aug 25 15:31:33 2010	(r24919)
+++ trunk/libavformat/rtsp.c	Wed Aug 25 15:42:17 2010	(r24920)
@@ -797,7 +797,7 @@ int ff_rtsp_read_reply(AVFormatContext *
             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 */



More information about the ffmpeg-cvslog mailing list