Bug/patch in transfer.c, 1.3.25

Message ID 200506052103.20520.wolfgang@rohdewald.de
State New
Headers

Commit Message

Wolfgang Rohdewald June 5, 2005, 7:03 p.m. UTC
  this might explain why vdr often dies when switching from/to a channel with DD sound -
like ZDF and Pro 7, at least I hope so. Not tested yet, but the bug seems clear enough:



Program received signal SIGILL, Illegal instruction.
[Switching to Thread 557063 (LWP 15183)]
0xb7db542e in main_arena () from /lib/libc.so.6
(gdb) bt
#0  0xb7db542e in main_arena () from /lib/libc.so.6
#1  0x0811db65 in cTransfer::Action (this=0xac88870) at transfer.c:84
#2  0x08114d9e in cThread::StartThread (Thread=0xac88990) at thread.c:233
#3  0xb7ea7e51 in pthread_start_thread () from /lib/libpthread.so.0
#4  0xb7ea7ecf in pthread_start_thread_event () from /lib/libpthread.so.0
#5  0xb7d5c92a in clone () from /lib/libc.so.6
(gdb) up
#1  0x0811db65 in cTransfer::Action (this=0xac88870) at transfer.c:84
84                 if (ringBuffer->Available() < RequiredBufferReserve) { // used to be MAXFRAMESIZE, but the HDTV value of KILOBYTE(512) is way too much here
Current language:  auto; currently c++
(gdb) p RequiredBufferReserve
$1 = 589824
(gdb) p DvbCardWith4MBofSDRAM
$4 = false
  

Comments

Wolfgang Rohdewald June 5, 2005, 7:08 p.m. UTC | #1
On Sonntag 05 Juni 2005 21:03, Wolfgang Rohdewald wrote:
> this might explain why vdr often dies when switching from/to a channel with DD sound -
> like ZDF and Pro 7, at least I hope so. Not tested yet, but the bug seems clear enough:

Nope, the problems are still there:

un  5 21:03:43 mm kernel: DVB: registering frontend 1 (ST STV0299 DVB-S)...
06/05 21:04:11 vdr[19977]: switching to channel 2
Jun  5 21:04:11 mm kernel: dvb-ttpci: warning: timeout waiting in BlitBitmap: -512, 1
06/05 21:04:11 vdr[20098]: transfer thread started (pid=20098, tid=262151)
06/05 21:04:11 vdr[20099]: receiver on device 1 thread started (pid=20099, tid=278536)
06/05 21:04:11 vdr[20100]: TS buffer on device 1 thread started (pid=20100, tid=294921)
Jun  5 21:04:16 mm kernel: dvb-ttpci: warning: timeout waiting in BlitBitmap: -512, 1
06/05 21:04:14 vdr[19977]: switching to channel 3
06/05 21:04:14 vdr[20098]: transfer thread ended (pid=20098, tid=262151)
06/05 21:04:14 vdr[20100]: TS buffer on device 1 thread ended (pid=20100, tid=294921)
06/05 21:04:14 vdr[20099]: buffer stats: 92308 (4%) used
06/05 21:04:14 vdr[20099]: receiver on device 1 thread ended (pid=20099, tid=278536)
06/05 21:04:14 vdr[19977]: buffer stats: 317156 (15%) used
06/05 21:04:16 vdr[19977]: switching to channel 4
06/05 21:04:16 vdr[20126]: transfer thread started (pid=20126, tid=311303)
06/05 21:04:16 vdr[20127]: receiver on device 1 thread started (pid=20127, tid=327688)
06/05 21:04:16 vdr[20128]: TS buffer on device 1 thread started (pid=20128, tid=344073)
Jun  5 21:04:17 mm kernel: __av7110_send_fw_cmd: timeout waiting on busy MSG QUEUE
Jun  5 21:04:17 mm kernel: dvb-ttpci: av7110_send_fw_cmd(): av7110_send_fw_cmd error -1
Jun  5 21:04:17 mm kernel: dvb-ttpci: av7110_fw_cmd error -1
Jun  5 21:04:18 mm kernel: __av7110_send_fw_cmd: timeout waiting on busy MSG QUEUE
Jun  5 21:04:18 mm kernel: dvb-ttpci: av7110_send_fw_cmd(): av7110_send_fw_cmd error -1
06/05 21:04:18 vdr[19983]: channel 7 (ProSieben) event 20:16 \'Tiger & Dragon\' status 4
06/05 21:04:20 vdr[20126]: clearing device because of consecutive poll timeouts
06/05 21:04:21 vdr[20126]: clearing device because of consecutive poll timeouts
  

Patch

--- xx  2005-06-05 20:59:08.000000000 +0200
+++ transfer.c  2005-06-05 20:59:16.000000000 +0200
@@ -68,7 +68,7 @@ 
   int Result = 0;
 #ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
   bool GotBufferReserve = false;
-  int RequiredBufferReserve = KILOBYTE(DvbCardWith4MBofSDRAM ? 288 : 576);
+  int RequiredBufferReserve = KILOBYTE(DvbCardWith4MBofSDRAM ? 576 : 288);
 #endif
   active = true;
   while (active) {