changeset 12043:8d45dcfc016f

Fixed a bug that was accidentally introduced by the addition of MPEG Transport Stream support. We now handle errors such as 'stream not found' correctly once again.
author rsf
date Fri, 19 Mar 2004 10:15:41 +0000
parents ebea9d9163b0
children 9695d7a299dc
files libmpdemux/demux_rtp.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rtp.cpp	Thu Mar 18 22:00:31 2004 +0000
+++ b/libmpdemux/demux_rtp.cpp	Fri Mar 19 10:15:41 2004 +0000
@@ -120,6 +120,7 @@
 int rtspStreamOverTCP = 0; 
 
 extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) {
+  Boolean success = False;
   do {
     TaskScheduler* scheduler = BasicTaskScheduler::createNew();
     if (scheduler == NULL) break;
@@ -253,7 +254,9 @@
       }
       rtpState->flags |= flags;
     }
+    success = True;
   } while (0);
+  if (!success) return NULL; // an error occurred
 
   // Hack: If audio and video are demuxed together on a single RTP stream,
   // then create a new "demuxer_t" structure to allow the higher-level