[mythtv] [patch] Backtrace for SEGV while editing recording
Stuart Auchterlonie
stuarta at squashedfrog.net
Sun Jun 5 16:04:35 UTC 2005
On Sun, Jun 05, 2005 at 10:04:06AM -0400, J. Donavan Stanley wrote:
> William Uther wrote:
>
> >
> > Index: osdtypes.cpp
>
>
> You need to attach your patch instead of cutting and pasting it.
Here's the patch with the updates by Will included.
Stuart
-------------- next part --------------
Index: libs/libmythtv/osdtypes.cpp
===================================================================
--- libs/libmythtv/osdtypes.cpp (revision 44)
+++ libs/libmythtv/osdtypes.cpp (working copy)
@@ -195,7 +195,7 @@
}
else if (OSDTypeImage *item = dynamic_cast<OSDTypeImage*>(type))
{
- item->Reinit(wmult, hmult);
+ item->Reinit(wchange, hchange, wmult, hmult);
}
else if (OSDTypeBox *item = dynamic_cast<OSDTypeBox*>(type))
{
@@ -709,8 +709,6 @@
m_scalew = scalew;
m_scaleh = scaleh;
- m_wmult = wmult;
- m_hmult = hmult;
LoadImage(filename, wmult, hmult, scalew, scaleh);
}
@@ -796,18 +794,15 @@
m_name = name;
}
-void OSDTypeImage::Reinit(float wmult, float hmult)
+void OSDTypeImage::Reinit(float wchange, float hchange, float wmult, float hmult)
{
- int x = (int)(m_displaypos.x() * wmult / m_wmult);
- int y = (int)(m_displaypos.y() * hmult / m_hmult);
+ int x = (int)(m_displaypos.x() * wchange);
+ int y = (int)(m_displaypos.y() * hchange);
m_displaypos.setX(x);
m_displaypos.setY(y);
- m_wmult = wmult;
- m_hmult = hmult;
-
- LoadImage(m_filename, m_wmult, m_hmult, m_scalew, m_scaleh);
+ LoadImage(m_filename, wmult, hmult, m_scalew, m_scaleh);
}
void OSDTypeImage::LoadImage(const QString &filename, float wmult, float hmult,
@@ -1080,7 +1075,7 @@
m_displayrect = QRect(x, y, width, height);
- OSDTypeImage::Reinit(wmult, hmult);
+ OSDTypeImage::Reinit(wchange, hchange, wmult, hmult);
}
void OSDTypePosSlider::SetPosition(int pos)
@@ -1129,7 +1124,7 @@
m_displayrect = QRect(x, y, width, height);
- OSDTypeImage::Reinit(wmult, hmult);
+ OSDTypeImage::Reinit(wchange, hchange, wmult, hmult);
}
void OSDTypeFillSlider::SetPosition(int pos)
@@ -1236,9 +1231,6 @@
if (m_ralpha)
delete [] m_ralpha;
- m_wmult = wmult;
- m_hmult = hmult;
-
LoadImage(m_redname, wmult, hmult, m_scalew, m_scaleh);
if (m_isvalid)
{
@@ -1654,7 +1646,7 @@
void OSDTypePositionImage::Reinit(float wchange, float hchange, float wmult,
float hmult)
{
- OSDTypeImage::Reinit(wmult, hmult);
+ OSDTypeImage::Reinit(wchange, hchange, wmult, hmult);
for (int i = 0; i < m_numpositions; i++)
{
Index: libs/libmythtv/osdtypes.h
===================================================================
--- libs/libmythtv/osdtypes.h (revision 44)
+++ libs/libmythtv/osdtypes.h (working copy)
@@ -226,7 +226,7 @@
virtual ~OSDTypeImage();
void SetName(const QString &name);
- void Reinit(float wmult, float hmult);
+ void Reinit(float wchange, float hchange, float wmult, float hmult);
void LoadImage(const QString &filename, float wmult, float hmult,
int scalew = -1, int scaleh = -1);
@@ -262,7 +262,6 @@
unsigned char *m_alpha;
int m_scalew, m_scaleh;
- float m_wmult, m_hmult;
int m_drawwidth;
bool m_onlyusefirst;
More information about the mythtv-dev
mailing list