Modify

Ticket #5283 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

startup with non unity timestretch doesnt work properly

Reported by: markspieth Owned by: ijr
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

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

Change History

Changed 4 years ago by markspieth

comment:1 Changed 4 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 4 years ago by jppoet@…

BT of segfault triggered by this ticket

comment:2 Changed 4 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 4 years ago by jppoet@…

BT with maxcpus=1

Changed 4 years ago by jppoet@…

log with maxcpus=1

comment:3 Changed 4 years ago by danielk

  • Status changed from new to closed
  • Resolution set to fixed

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

Changed 4 years ago by jppoet@…

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

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.