[mythtv] Realtime commflag bug?

Chris Pinkham cpinkham at bc2va.org
Fri Mar 17 07:20:33 UTC 2006


* On Tue Mar 14, 2006 at 03:02:17PM +0100, Thomas B?rkel wrote:
> >>> When the flagger sends a new commercial skip map to the player, we
> >>> should trigger the decoder to update it's seektable so we know how long
> >>> the recording is.  Normally this sync would only happen when we skip.

> Whenever you have the fix ready, I am willing to patch it into 0.19 and 
> test.

OK, here's something you can try.  I think this will fix it for you, but
want an outside test.  If it solves the issue I'll get it into -fixes as
well.

--
Chris
-------------- next part --------------
Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.cpp	(revision 9368)
+++ libs/libmythtv/NuppelVideoPlayer.cpp	(working copy)
@@ -201,6 +201,7 @@
       hascommbreaktable(false),
       deleteIter(deleteMap.end()),  blankIter(blankMap.end()),
       commBreakIter(commBreakMap.end()),
+      forcePositionMapSync(false),
       // Playback (output) speed control
       decoder_lock(true),
       next_play_speed(1.0f),        next_normal_speed(true),
@@ -2913,6 +2914,12 @@
                 JumpToProgram();
         }
 
+        if (forcePositionMapSync)
+        {
+            forcePositionMapSync = false;
+            GetDecoder()->SyncPositionMap();
+        }
+
         if (IsErrored() || (nvr_enc && nvr_enc->GetErrorStatus()))
         {
             VERBOSE(VB_IMPORTANT, LOC_ERR + "Unknown error, exiting decoder");
@@ -4880,6 +4887,8 @@
     hascommbreaktable = !commBreakMap.isEmpty();
     SetCommBreakIter();
     commBreakMapLock.unlock();
+
+    forcePositionMapSync = true;
 }
 
 bool NuppelVideoPlayer::RebuildSeekTable(bool showPercentage, StatusCallback cb, void* cbData)
@@ -6070,3 +6079,5 @@
     osdtheme = QDeepCopy<QString>(themename);
 }
 // EIA-708 caption support -- end
+
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
Index: libs/libmythtv/NuppelVideoPlayer.h
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.h	(revision 9368)
+++ libs/libmythtv/NuppelVideoPlayer.h	(working copy)
@@ -665,6 +665,7 @@
     QMap<long long, int>::Iterator blankIter;
     QMap<long long, int>::Iterator commBreakIter;
     QDateTime  lastIgnoredManualSkip;
+    bool       forcePositionMapSync;
 
     // Playback (output) speed control
     /// Lock for next_play_speed and next_normal_speed


More information about the mythtv-dev mailing list