# HG changeset patch # User mstorsjo # Date 1282743737 0 # Node ID 31aef55204bda59c34868a8055f7fbccf2bc5506 # Parent fe8fadaf5fb607e261a4aa59a83de6dedb7a96d2 rtsp: Return EOF if the TCP control channel is closed diff -r fe8fadaf5fb6 -r 31aef55204bd rtsp.c --- a/rtsp.c Wed Aug 25 13:31:33 2010 +0000 +++ b/rtsp.c Wed Aug 25 13:42:17 2010 +0000 @@ -797,7 +797,7 @@ 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 @@ 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 */