mirror of https://github.com/mpv-player/mpv
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:
parent
f1b9d02c19
commit
5f0a0e39e4
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue