diff options
author | Martin Storsjö <martin@martin.st> | 2010-08-25 13:42:17 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-08-25 13:42:17 +0000 |
commit | 2401660d2f200007d00337a86dc4d88f51a2f3f8 (patch) | |
tree | eca87148f8e77a23a3ad581622e708222f282ec6 /libavformat/rtsp.c | |
parent | 5a8693ef592af559f3844013cfc24e63af48de08 (diff) | |
download | ffmpeg-streaming-2401660d2f200007d00337a86dc4d88f51a2f3f8.zip ffmpeg-streaming-2401660d2f200007d00337a86dc4d88f51a2f3f8.tar.gz |
rtsp: Return EOF if the TCP control channel is closed
Originally committed as revision 24920 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 */ |