[mythtv-commits] Ticket #2822: Fix a segfault in livetv when switching from a digital to an analog channel
MythTV
mythtv at cvs.mythtv.org
Fri Dec 22 04:42:54 UTC 2006
#2822: Fix a segfault in livetv when switching from a digital to an analog channel
-------------------------------------+--------------------------------------
Reporter: jedynamic at bellsouth.net | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: low |
-------------------------------------+--------------------------------------
The problem is that when switching from a digital to an analog channel in
livetv a segfault can occur. I ran this through gdb and noticed that the
av_pause_frame.buf somehow became NULL when we where displaying the pause
frame. This caused the segfault.
I looked through the code and noticed that the av_pause_frame.buf will
always get cleared out when InputChanged() is called (via a call to
DeleteBuffers()). The only way the pause frame will get recreated is if
CreateBuffers() is called (which ends up calling CreatePauseFrame()).
CreateBuffers() is only called if we didn't change a codec_id (inside
InputChanged()). If the codec_id changes then we call InitSetupBuffers().
InitSetupBuffers() will not recreate the av_pause_frame.buf. Thus, we get
the segfault noted above once we try to display a pause frame.
My patch will make InitSetupBuffers() recreate the pause frame. I have
tested a variant of this patch in .20 (only the VideoOutputSubType()
parameter passed is different) and I do not see the segfault anymore.
Jimmy
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/2822>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list