#!/bin/sh /usr/share/dpatch/dpatch-run

## vbox-1.3.18 patch by Gunnar Roth <gunnar.roth@gmx.de>
##
## posted on vdr@linuxtv.org mailing list on Fri, 21 Jan 2005 11:01:26 +0100:
## <006101c4ffa0$2b5d94e0$25c6fea9@ww004.siemens.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes for VDR >= 1.3.18.

@DPATCH@
--- vbox-0.5.1/sndplayer.c 2004-08-14 18:48:29.000000000 +0200
+++ vbox-0.5.1/sndplayer.c 2005-01-21 11:00:24.000000000 +0100
@@ -491,4 +491,9 @@
   // state = msStop;
   // SetPlayMode(pmStopped);
+
+#if VDRVERSNUM >= 10318
+  cDevice::PrimaryDevice()->SetCurrentAudioTrack(ttDolbyFirst);
+#endif
+
   state = msStart;
   SetPlayMode(pmPlay);
@@ -639,7 +644,12 @@
     if (pframe) {
       n += pc;
+#if VDRVERSNUM < 10318
       d(printf("PlayVideo(%d Byte, %d Byte played)\n", pc, n))

       int w = PlayVideo(p, pc);
+#else
+      d(printf("PlayPes(%d Byte, %d Byte played)\n", pc, n))
+      int w = PlayPes(p,pc);
+#endif
       if(w > 0) {
         p += w;
