# HG changeset patch # User rtognimp # Date 1098130092 0 # Node ID 929af3b49c8ef543bd15167520f7397d4ed48463 # Parent d4cba4c4c54c48743028719d2bf8bb2d24a341f4 EOF detection (fix hanging at end of stream) diff -r d4cba4c4c54c -r 929af3b49c8e libmpdemux/realrtsp/real.c --- a/libmpdemux/realrtsp/real.c Mon Oct 18 20:00:07 2004 +0000 +++ b/libmpdemux/realrtsp/real.c Mon Oct 18 20:08:12 2004 +0000 @@ -618,6 +618,10 @@ #ifdef LOG printf("got flags1: 0x%02x\n",flags1); #endif + if(header[6] == 0x06) { + printf("Stream EOF detected\n"); + return -1; + } header[0]=header[5]; header[1]=header[6]; header[2]=header[7]; diff -r d4cba4c4c54c -r 929af3b49c8e libmpdemux/realrtsp/rtsp_session.c --- a/libmpdemux/realrtsp/rtsp_session.c Mon Oct 18 20:00:07 2004 +0000 +++ b/libmpdemux/realrtsp/rtsp_session.c Mon Oct 18 20:08:12 2004 +0000 @@ -169,6 +169,8 @@ dest += fill; this->recv_read = 0; this->recv_size = real_get_rdt_chunk (this->s, (char **)&(this->recv)); + if (this->recv_size < 0) + return -1; source = this->recv; fill = this->recv_size;