Re: dvbplayer segfault vdr-1.7.39

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09.03.2013 23:38, Mike Booth wrote:
I am getting the following message when trying to replay recordings.

kernel: [ 8579.175197] dvbplayer[10786]: segfault at a3c7b0d5 ip 0815e942 sp
a16cdf50 error 4 in vdr[8048000+171000]


Anyone have the same problem or any idea what it means?


Using xineliboutput from cvs linux-3.8 and vdr-1.7.39.

Please try if the attached patch fixes this.

Klaus
--- dvbplayer.c	2013/02/25 12:15:58	2.32
+++ dvbplayer.c	2013/03/08 13:44:19
@@ -33,6 +33,7 @@
 public:
   cPtsIndex(void);
   void Clear(void);
+  bool IsEmpty(void);
   void Put(uint32_t Pts, int Index);
   int FindIndex(uint32_t Pts);
   };
@@ -49,6 +50,12 @@
   w = r = 0;
 }
 
+bool cPtsIndex::IsEmpty(void)
+{
+  cMutexLock MutexLock(&mutex);
+  return w == r;
+}
+
 void cPtsIndex::Put(uint32_t Pts, int Index)
 {
   cMutexLock MutexLock(&mutex);
@@ -810,12 +817,14 @@
 
 void cDvbPlayer::SetAudioTrack(eTrackType Type, const tTrackId *TrackId)
 {
-  if (isPesRecording)
-     return; // for some unknown reason this doesn't work with PES recordings - causes a segfault
+  if (!cThread::IsMainThread())
+     return; // only do this upon user interaction
   if (playMode == pmPlay) {
-     int Current, Total;
-     if (GetIndex(Current, Total, true))
-        Goto(Current);
+     if (!ptsIndex.IsEmpty()) {
+        int Current, Total;
+        if (GetIndex(Current, Total, true))
+           Goto(Current);
+        }
      }
   else if (playMode == pmPause)
      resyncAfterPause = true;
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux