summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-18 20:08:12 +0000
committerrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-18 20:08:12 +0000
commit5f0a0e39e4b2c823b164acb4356d7aab9953e041 (patch)
tree9de451b439fa04303d99e374ac809ce0fce72a45 /libmpdemux
parentf1b9d02c19403d8771946ceec4e8530a075bc2b7 (diff)
downloadmpv-5f0a0e39e4b2c823b164acb4356d7aab9953e041.tar.bz2
mpv-5f0a0e39e4b2c823b164acb4356d7aab9953e041.tar.xz
EOF detection (fix hanging at end of stream)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13677 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/realrtsp/real.c4
-rw-r--r--libmpdemux/realrtsp/rtsp_session.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/libmpdemux/realrtsp/real.c b/libmpdemux/realrtsp/real.c
index ae5b469cfd..565a9b7e8e 100644
--- a/libmpdemux/realrtsp/real.c
+++ b/libmpdemux/realrtsp/real.c
@@ -618,6 +618,10 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer) {
#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 --git a/libmpdemux/realrtsp/rtsp_session.c b/libmpdemux/realrtsp/rtsp_session.c
index 013e4fe2bc..89cd140340 100644
--- a/libmpdemux/realrtsp/rtsp_session.c
+++ b/libmpdemux/realrtsp/rtsp_session.c
@@ -169,6 +169,8 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) {
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;