[libavg-devel] Error in TrackerConfig.cpp
Daniel Beier
daniel_beier at gmx.de
Wed Feb 20 21:11:01 CET 2008
Hi again,
> Sounds like a bug, though I can't test it at the moment. Since you
> already have a fix: Can you send a patch?
I've just hacked one solution that I can't send as a patch because its
very ugly.
But I have investigated further and located the bug at:
void TrackerEventSource::endCalibration()
{
assert(m_pCalibrator);
m_TrackerConfig.m_pTrafo = m_pCalibrator->makeTransformer();
setConfig();
delete m_pCalibrator;
m_pCalibrator = 0;
m_pOldTransformer = DeDistortPtr();
}
The assignement of a calibration to m_TrackerConfig.m_pTrafo is not
enough, since this pointer is only held in TrackerConfig but not used
in:
void TrackerConfig::save(const string& sFilename)
{
...
if (m_Doc)
xmlSaveFileEnc(m_sFilename.c_str(), m_Doc, "utf-8");
...
Since I haven't beed involved in libavg development yet, I'm uncertain
how to correctly implement a change without "breaking the rules". I'm
going to write an update method in TrackerConfig, which sets the
contents of m_Doc via calls to TrackerConfig::setParam method for each
parameter. This will be called
in TrackerEventSource::endCalibration().
If this is ok, I'll happily submit the results - if you have another
opinion regarding this I'll try to implement this as well.
Best Regards,
Daniel
More information about the libavg-devel
mailing list