All pastes #184998 Raw Edit

skamithi

public text v1 · immutable
#184998 ·published 2006-09-28 15:02 UTC
rendered paste body
Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.cpp	(revision 11317)
+++ libs/libmythtv/NuppelVideoPlayer.cpp	(working copy)
@@ -6314,11 +6314,10 @@
     int numbuttons = ringBuffer->DVD()->NumMenuButtons();
     bool osdshown = osd->IsSetDisplaying("subtitles");
     long long menupktpts = ringBuffer->DVD()->GetMenuPktPts();
-    bool instillframe = ringBuffer->DVD()->InStillFrame();
 
     if ((numbuttons == 0) || 
         (osdshown) ||
-        (instillframe && buffer->timecode > 0) ||
+        (indvdstillframe && buffer->timecode > 0) ||
         ((!osdshown) && 
             (!indvdstillframe) &&
             (hidedvdbutton) &&
Index: libs/libmythtv/avformatdecoder.cpp
===================================================================
--- libs/libmythtv/avformatdecoder.cpp	(revision 11317)
+++ libs/libmythtv/avformatdecoder.cpp	(working copy)
@@ -464,9 +464,13 @@
 void AvFormatDecoder::SeekReset(long long newKey, uint skipFrames,
                                 bool doflush, bool discardFrames)
 {
-    if (ringBuffer->InDVDMenuOrStillFrame())
-        return;
-
+    if (ringBuffer->isDVD())
+    {
+        if (ringBuffer->InDVDMenuOrStillFrame() ||
+            newKey == 0) 
+            return;
+    }
+            
     VERBOSE(VB_PLAYBACK, LOC +
             QString("SeekReset(%1, %2, %3 flush, %4 discard)")
             .arg(newKey).arg(skipFrames)
@@ -1497,21 +1501,23 @@
                 trackNo = GetTrackCount(kTrackTypeAudio) - 1;
             SetTrack(kTrackTypeAudio, trackNo);
         }
-        if (tracks[kTrackTypeSubtitle].size() > 1)
+        if (tracks[kTrackTypeSubtitle].size() > 0)
         {
             qBubbleSort(tracks[kTrackTypeSubtitle]);
             int trackNo = ringBuffer->DVD()->GetTrack(kTrackTypeSubtitle);
             uint captionmode = GetNVP()->GetCaptionMode();
-            if (captionmode == kDisplayAVSubtitle) {
-                if (trackNo < 0 || trackNo >= (int)GetTrackCount(kTrackTypeSubtitle))
+            if (captionmode == kDisplayAVSubtitle &&
+                (trackNo < 0 || trackNo >= (int)GetTrackCount(kTrackTypeSubtitle)))
+            {
+                GetNVP()->SetCaptionsEnabled(false, false);
+            }
+            else
+            {
+                if (!ringBuffer->InDVDMenuOrStillFrame() && trackNo >= 0)
                 {
-                    GetNVP()->SetCaptionsEnabled(false, false);
+                    SetTrack(kTrackTypeSubtitle, trackNo);
+                    GetNVP()->SetCaptionsEnabled(true, false);
                 }
-                else
-                {
-                    if (!ringBuffer->InDVDMenuOrStillFrame() && trackNo >= 0)
-                        GetNVP()->SetCaptionsEnabled(true, false);
-                }
             }
         }
     }
Index: libs/libmythtv/DVDRingBuffer.cpp
===================================================================
--- libs/libmythtv/DVDRingBuffer.cpp	(revision 11317)
+++ libs/libmythtv/DVDRingBuffer.cpp	(working copy)
@@ -315,7 +315,7 @@
                 ClearSubtitlesOSD();
 
                 if (autoselectsubtitle)
-                    curSubtitleTrack = dvdnav_get_active_spu_stream(dvdnav) & 0x1F;
+                    curSubtitleTrack = dvdnav_get_active_spu_stream(dvdnav);
 
                 if (parent)
                 {
Index: libs/libmythtv/DVDRingBuffer.h
===================================================================
--- libs/libmythtv/DVDRingBuffer.h	(revision 11317)
+++ libs/libmythtv/DVDRingBuffer.h	(working copy)
@@ -147,7 +147,7 @@
     /// menu pkt pts is not reliable
     long long      menupktpts;
     int            curAudioTrack;
-    int            curSubtitleTrack;
+    int8_t         curSubtitleTrack;
     bool           autoselectaudio;
     bool           autoselectsubtitle;
     const char     *dvdname;
Index: libs/libmythdvdnav/vm.c
===================================================================
--- libs/libmythdvdnav/vm.c	(revision 11317)
+++ libs/libmythdvdnav/vm.c	(working copy)
@@ -757,11 +757,11 @@
     }
   }
 
-  if((vm->state).domain == VTS_DOMAIN && !((vm->state).SPST_REG & 0x40))
+  if((vm->state).SPST_REG & 0x40)
     /* Bit 7 set means hide, and only let Forced display show */
-    return (streamN | 0x80);
+    return (streamN & 0x1F);
   else
-    return streamN;
+    return -1;
 }
 
 void vm_get_angle_info(vm_t *vm, int *current, int *num_avail) {