[mythtv] bug in mythvideo
Jason Ferrara
jason at discordia.org
Sun Feb 8 22:27:30 EST 2004
I'm not quite sure if this is bug or I'm just not understanding
something, since I would have
thought someone else would have noticed this by now (I've seen this
with 0.13
and 0.14), but.....
I have mythvideo set up to play files using the following command line
xine -pq -V Xv -f -g ""%s""
If I start a video and then quit xine quickly, everything is fine. But
if I let it
play for a bit, and then quit xine, xine quits, but then immediately
pops back
up again with an error message.
Looking in videobrowser.cpp at line 304 I see...
// Play the movie
myth_system((QString("%1 ") .arg(m_cmd)).local8Bit());
Metadata *childItem = new Metadata;
Metadata *parentItem = new Metadata(*curitem);
while (parentItem->ChildID() && playing_time.elapsed() > 10000)
{
childItem->setID(parentItem->ChildID());
childItem->fillDataFromID(db);
if (parentItem->ChildID())
{
//Load up data about this child
selected(childItem);
playing_time.start();
myth_system((QString("%1 ") .arg(m_cmd)).local8Bit());
}
delete parentItem;
parentItem = new Metadata(*childItem);
}
I don't understand what's going on here. The video is already playing
happily, why
are we even looking and child items and restarting player? And what's
magical about
10000?
I do notice that when I see the problem, parentItem->ChildId() is -1,
which I assume
means there is no child. But the code there goes off and tries to get
data for the child,
so it ends up restarting xine with bogus parameters.
If I change line 310 to
while ((parentItem->ChildID() != -1) && playing_time.elapsed() > 10000)
then things seem to work for me.
So, is this a real bug ( and is my fix the right fix), or is my setup
wrong somehow
and I'm just confused about how things should work? And why is the code
there
looking at children anyway?
- Jason
More information about the mythtv-dev
mailing list