protect against broken .cuts files
authorFelix Domke <tmbinc@elitedvb.net>
Thu, 6 Mar 2008 18:16:49 +0000 (18:16 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Thu, 6 Mar 2008 18:16:49 +0000 (18:16 +0000)
lib/service/servicedvb.cpp

index 2d770fb..8e8fc5e 100644 (file)
@@ -2563,7 +2563,16 @@ void eDVBServicePlay::cutlistToCuesheet()
                        }
                }
                
                        }
                }
                
-               if (in != out)
+               if (in < 0)
+                       in = 0;
+               if (out < 0)
+                       out = 0;
+               if (in > length)
+                       in = length;
+               if (out > length)
+                       out = length;
+               
+               if (in < out)
                        m_cue->addSourceSpan(in, out);
                
                in = length;
                        m_cue->addSourceSpan(in, out);
                
                in = length;