Skip to content
This repository
Browse code

pvr: align NexStream and SkipNext with logic in dvdplayer

  • Loading branch information...
commit cbad7f0e8feca4cb96a21bb6c84d98272edb000f 1 parent 1410f36
Rainer Hochecker authored March 28, 2013
24  xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamPVRManager.cpp
@@ -45,7 +45,6 @@ CDVDInputStreamPVRManager::CDVDInputStreamPVRManager(IDVDPlayer* pPlayer) : CDVD
45 45
   m_pLiveTV         = NULL;
46 46
   m_pOtherStream    = NULL;
47 47
   m_eof             = true;
48  
-  m_bReopened       = false;
49 48
   m_iScanTimeout    = 0;
50 49
 }
51 50
 
@@ -311,28 +310,20 @@ bool CDVDInputStreamPVRManager::UpdateItem(CFileItem& item)
311 310
 
312 311
 CDVDInputStream::ENextStream CDVDInputStreamPVRManager::NextStream()
313 312
 {
314  
-  if(!m_pFile) return NEXTSTREAM_NONE;
  313
+  if(!m_pFile)
  314
+    return NEXTSTREAM_NONE;
315 315
 
316  
-  if(m_bReopened)
317  
-  {
318  
-    if (IsEOF())
319  
-      return NEXTSTREAM_NONE;
320  
-    else
321  
-    {
322  
-      m_bReopened = false;
323  
-      m_eof       = false;
324  
-      return NEXTSTREAM_RETRY;
325  
-    }
326  
-  }
  316
+  m_eof = IsEOF();
327 317
 
328 318
   if (m_pOtherStream)
329 319
     return m_pOtherStream->NextStream();
330 320
   else if(m_pFile->SkipNext())
331 321
   {
332  
-    m_eof = false;
333  
-    return NEXTSTREAM_OPEN;
  322
+    if (m_eof)
  323
+      return NEXTSTREAM_OPEN;
  324
+    else
  325
+      return NEXTSTREAM_RETRY;
334 326
   }
335  
-
336 327
   return NEXTSTREAM_NONE;
337 328
 }
338 329
 
@@ -385,7 +376,6 @@ bool CDVDInputStreamPVRManager::CloseAndOpen(const char* strFile)
385 376
 
386 377
   if (Open(strFile, m_content))
387 378
   {
388  
-    m_bReopened = true;
389 379
     return true;
390 380
   }
391 381
 
1  xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamPVRManager.h
@@ -98,7 +98,6 @@ class CDVDInputStreamPVRManager
98 98
   XFILE::IRecordable*       m_pRecordable;
99 99
   bool                      m_eof;
100 100
   std::string               m_strContent;
101  
-  bool                      m_bReopened;
102 101
   unsigned int              m_iScanTimeout;
103 102
 };
104 103
 

0 notes on commit cbad7f0

Please sign in to comment.
Something went wrong with that request. Please try again.