aboutsummaryrefslogtreecommitdiffhomepage
path: root/stream
diff options
context:
space:
mode:
authorGravatar rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-20 22:32:38 +0000
committerGravatar rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-20 22:32:38 +0000
commit8927f243487559b5741a09b4ff4bfd58957b23ca (patch)
tree88e3ecc66d9b460965a75f7f8b4f7760b2acf6a1 /stream
parentf8dcd9f789458b1bdd9abbfe3a8a66bf77f73bd2 (diff)
Declare eof only when stream 0 gets eof
Fixes premature eof on rtsp://vodreal.stanford.edu/opa/philo/061022.rm git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22768 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/realrtsp/real.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index beb115f320..7495dab2f3 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -359,7 +359,15 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) {
#ifdef LOG
printf("got flags1: 0x%02x\n",flags1);
#endif
- if(header[6] == 0x06) {
+ if(header[6] == 0x06) { // eof packet
+ rtsp_read_data(rtsp_session, header, 7); // Skip the rest of the eof packet
+ /* Some files have short auxiliary streams, we must ignore eof packets
+ * for these streams to avoid premature eof.
+ * Now the code declares eof only if the stream with id == 0 gets eof
+ * (old code was: eof on the first eof packet received).
+ */
+ if(flags1 & 0x7c) // ignore eof for streams with id != 0
+ return 0;
mp_msg(MSGT_STREAM, MSGL_INFO, "realrtsp: Stream EOF detected\n");
return -1;
}