[mythtv] bug in mythvideo

Kenneth Aafl°y ke-aa at frisurf.no
Sun Feb 8 23:26:21 EST 2004


On Monday 09 February 2004 04:27, Jason Ferrara wrote:
> 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?

This code is used to play a two (or more) part file, which I belive you have 
to edit the database to activate. The macical about 10000 (10s) is that there 
is absolutly no point in playing the second file if the user aborted the 
first (or it's of length) below 10s. I would suggest looking at your database 
with the mysql tool (reference at www.mysql.org), and checking the childid 
field (iirc) of this table (videometadata in the mythconverg table).

--

Kenneth (ke-aa \0 frisurf.no)



More information about the mythtv-dev mailing list