Ticket #3350: mythtv_threadpreviewgen.patch

File mythtv_threadpreviewgen.patch, 1.1 KB (added by Mark Spieth, 13 years ago)
  • programs/mythfrontend/playbackbox.cpp

     
    40034003 */
    40044004bool PlaybackBox::SetPreviewGenerator(const QString &xfn, PreviewGenerator *g)
    40054005{
    4006     QString fn = xfn.mid(xfn.findRev('/') + 1);
     4006    QString fn = xfn.mid(max(xfn.findRev('/') + 1,0));
    40074007    if (!g)
    40084008    {
    40094009        if (previewGeneratorLock.tryLock())
     
    40324032    QMap<QString, PreviewGenerator*>::const_iterator it;
    40334033    QMutexLocker locker(&previewGeneratorLock);
    40344034
    4035     QString fn = xfn.mid(max(xfn.findRev('/'),0));
     4035    QString fn = xfn.mid(max(xfn.findRev('/') + 1,0));
    40364036    if ((it = previewGenerator.find(fn)) == previewGenerator.end())
    40374037        return false;
    40384038    return *it;
     
    40454045uint PlaybackBox::IncPreviewGeneratorAttempts(const QString &xfn)
    40464046{
    40474047    QMutexLocker locker(&previewGeneratorLock);
    4048     QString fn = xfn.mid(max(xfn.findRev('/'),0));
     4048    QString fn = xfn.mid(max(xfn.findRev('/') + 1,0));
    40494049    return previewGeneratorAttempts[fn]++;
    40504050}
    40514051