EOF detection (fix hanging at end of stream)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13677 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rtognimp 2004-10-18 20:08:12 +00:00
parent f1b9d02c19
commit 5f0a0e39e4
2 changed files with 6 additions and 0 deletions

View File

@ -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];

View File

@ -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;