Opened 16 years ago

Closed 16 years ago

#5283 closed defect (fixed)

startup with non unity timestretch doesnt work properly

Reported by: Mark Spieth Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

if a program/group has a non 1.0 timestretch associated with it, timestretch is not initialized correctly.

whilst this is primarily due to multiple calls to reconfigure which are probably not necessary, the underlying support function does not cater for removal of timestretch without the subsequent stretch value not being 1.0

attached patch allows correct reinitialization of timestretch within reconfigure.

Attachments (5)

mythtv_initialtimerstretch.1.patch (958 bytes) - added by Mark Spieth 16 years ago.
gdb.txt.bz2 (13.0 KB) - added by jppoet@… 16 years ago.
BT of segfault triggered by this ticket
BT.bz2 (7.6 KB) - added by jppoet@… 16 years ago.
BT with maxcpus=1
mythfrontend.log.bz2 (6.0 KB) - added by jppoet@… 16 years ago.
log with maxcpus=1
mythtv_initialtimerstretch.2.patch (2.0 KB) - added by jppoet@… 16 years ago.
release-0-21-fixes version of patch, including fix for triggered overflow

Download all attachments as: .zip

Change History (8)

Changed 16 years ago by Mark Spieth

comment:1 Changed 16 years ago by jppoet@…

Mark says my segfault is not part of the audio stuff. That being said, my mythfrontend randomly segfaults if "mythtv_initialtimerstretch.1.patch" is applied. I am attaching a BT.

Changed 16 years ago by jppoet@…

Attachment: gdb.txt.bz2 added

BT of segfault triggered by this ticket

comment:2 Changed 16 years ago by jppoet@…

Interesting. Using a kernel command line of "nosmp maxcpus=1" does *not* fix the segfault, but it does make the BT different. It still dies on a memcpy, but now it is at around line 1033 of audiooutputbase.cpp (SVN: 16252):

(gdb) up
#1  0xb6a08033 in AudioOutputBase::_AddSamples (this=0xac5c0008, buffer=0x94aa680, interleaved=true, samples=1536, timecode=24836170) at audiooutputbase.cpp:1033

                    //len = WaitForFreeSpace(amount);
                    char *ob = encoder->GetOutBuff();
                    if (amount >= bdiff)
                    {
                        memcpy(audiobuffer + org_waud, ob, bdiff);
                        ob += bdiff;
                        amount -= bdiff;
                        org_waud = 0;
                    }
                    if (amount > 0)
---->                  memcpy(audiobuffer + org_waud, ob, amount);

                    bdiff = AUDBUFSIZE - amount;
                    org_waud += amount;
                }

(gdb) print org_waud
$2 = 1536000
(gdb) print ob
$3 = 0x9549200 "rø\037N\001"
(gdb) print amount
$4 = 6144

URL: http://cvs.mythtv.org/svn/branches/release-0-21-fixes/mythtv
Repository Root: http://cvs.mythtv.org/svn
Repository UUID: 7dbf422c-18fa-0310-86e9-fd20926502f2
Revision: 17246

I am attaching a trace and the BT.

Changed 16 years ago by jppoet@…

Attachment: BT.bz2 added

BT with maxcpus=1

Changed 16 years ago by jppoet@…

Attachment: mythfrontend.log.bz2 added

log with maxcpus=1

comment:3 Changed 16 years ago by danielk

Resolution: fixed
Status: newclosed

(In [17253]) Fixes #5283. Refs #5313. Fixes for default audio timestretch != 1.0.

Changed 16 years ago by jppoet@…

release-0-21-fixes version of patch, including fix for triggered overflow

Note: See TracTickets for help on using tickets.