[MPlayer-cvslog] r21860 - in trunk/stream: librtsp/rtsp_session.c realrtsp/real.c realrtsp/real.h

rtogni subversion at mplayerhq.hu
Tue Jan 9 22:32:26 CET 2007


Author: rtogni
Date: Tue Jan  9 22:32:25 2007
New Revision: 21860

Modified:
   trunk/stream/librtsp/rtsp_session.c
   trunk/stream/realrtsp/real.c
   trunk/stream/realrtsp/real.h

Log:
Don't drop last rdt packet on eof


Modified: trunk/stream/librtsp/rtsp_session.c
==============================================================================
--- trunk/stream/librtsp/rtsp_session.c	(original)
+++ trunk/stream/librtsp/rtsp_session.c	Tue Jan  9 22:32:25 2007
@@ -208,6 +208,8 @@
     (char *) (this->real_session->recv + this->real_session->recv_read);
   int fill = this->real_session->recv_size - this->real_session->recv_read;
 
+  if(this->real_session->rdteof)
+    return -1;
   if (len < 0) return 0;
   if (this->real_session->recv_size < 0) return -1;
   while (to_copy > fill) {
@@ -218,8 +220,10 @@
     this->real_session->recv_read = 0;
     this->real_session->recv_size =
       real_get_rdt_chunk (this->s, (char **)&(this->real_session->recv));
-    if (this->real_session->recv_size < 0)
-      return -1;
+    if (this->real_session->recv_size < 0) {
+      this->real_session->rdteof = 1;
+      this->real_session->recv_size = 0;
+    }
     source = (char *) this->real_session->recv;
     fill = this->real_session->recv_size;
 

Modified: trunk/stream/realrtsp/real.c
==============================================================================
--- trunk/stream/realrtsp/real.c	(original)
+++ trunk/stream/realrtsp/real.c	Tue Jan  9 22:32:25 2007
@@ -649,6 +649,7 @@
 
   real_rtsp_session = malloc (sizeof (struct real_rtsp_session_t));
   real_rtsp_session->recv = xbuffer_init (BUF_SIZE);
+  real_rtsp_session->rdteof = 0;
 
   return real_rtsp_session;
 }

Modified: trunk/stream/realrtsp/real.h
==============================================================================
--- trunk/stream/realrtsp/real.h	(original)
+++ trunk/stream/realrtsp/real.h	Tue Jan  9 22:32:25 2007
@@ -45,6 +45,8 @@
   uint8_t header[HEADER_SIZE];
   int header_len;
   int header_read;
+
+  int rdteof;
 };
 
 int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer);



More information about the MPlayer-cvslog mailing list