> I think I found it.  In the randomize function it did a playList = 
> randomList which for QStringLists makes a reference copy of the list.  

Shows I'm still learning Qt. :)  Must be luck that I didn't see the
segfault, but then I don't use random much, adding it was an afterthought.

> hence the segfault.  I changed the playSelected to do this:

>             i = (int)(1.0 * playList.count() * rand() / (RAND_MAX + 1.0));
>             it = playList.at(i);

Won't this always play the list in random order in playSelected?  The reason
for the temporary randomList in doPlayListRandom(), was because sometimes
you want to specify the playback order and sometimes you want random order.
If the problem is the reference copy, maybe the solution is to just make
a loop copying randomList to playList in doPlayListRandom rather than just
setting playList = randomList.

> should have some time tonight and if it works, post the patch.  If you 
> want, I can post the patch untested if you had a chance to look at it 
> sooner.

I won't have a chance to look at it till then either, Myth is at home and I'm
not.

-- 

Chris

_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to