Ticket #2808: dvd_seeking_fix.diff

File dvd_seeking_fix.diff, 1.4 KB (added by skamithi, 17 years ago)

dvdnav_sector_search failed to seek to the right sector. changed it to make the da vinci dvd work. seems to work with other dvds too.

  • libs/libmythdvdnav/searching.c

     
    258258  for(cell_nr = first_cell_nr; (cell_nr <= last_cell_nr) && !found; cell_nr ++) {
    259259    cell =  &(state->pgc->cell_playback[cell_nr-1]);
    260260    length = cell->last_sector - cell->first_sector + 1;
    261     if (target >= length) {
    262       target -= length;
    263     } else {
    264       /* convert the target sector from Cell-relative to absolute physical sector */
    265       target += cell->first_sector;
     261    if (target >= cell->first_sector && target <= cell->last_sector) {
    266262      found = 1;
    267263      break;
    268264    }
  • libs/libmythtv/DVDRingBuffer.cpp

     
    296296
    297297                if (repeatseek)
    298298                {
     299                    QMutexLocker lock(&seekLock);
    299300                    Seek(seekpos, seekwhence);
    300301                    repeatseek = false;
    301302                }       
     
    510511    if (newPart > 0)
    511512        dvdnav_part_play(dvdnav, title, newPart);
    512513    else
    513         Seek(0,SEEK_SET); // May cause picture to become jumpy.
     514    {
     515        QMutexLocker lock(&seekLock);
     516        Seek(0,SEEK_SET);
     517    }
    514518    gotStop = false;
    515519}
    516520