Ticket #1827: dvd_seek_improv2.diff
File dvd_seek_improv2.diff, 1.9 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/DVDRingBuffer.cpp
40 40 menupktpts(0), curAudioTrack(0), 41 41 curSubtitleTrack(0), autoselectaudio(true), 42 42 autoselectsubtitle(true), 43 jumptotitle(true), parent(0) 43 jumptotitle(true), repeatseek(false), 44 seekpos(0), seekwhence(0), 45 parent(0) 44 46 { 45 47 } 46 48 … … 61 63 62 64 long long DVDRingBufferPriv::Seek(long long pos, int whence) 63 65 { 64 dvdnav_sector_search(this->dvdnav, pos / DVD_BLOCK_SIZE , whence); 66 dvdnav_status_t dvdRet = dvdnav_sector_search(this->dvdnav, pos / DVD_BLOCK_SIZE , whence); 67 if (dvdRet == DVDNAV_STATUS_ERR && !repeatseek) 68 { 69 VERBOSE(VB_PLAYBACK, LOC + QString("Seek failed to jump to position %1").arg(pos) + 70 " Will try and seek to this position at the next cell change"); 71 repeatseek = true; 72 seekpos = pos; 73 seekwhence = whence; 74 } 65 75 gotStop = false; 66 76 return GetReadPosition(); 67 77 } … … 264 274 autoselectsubtitle = true; 265 275 } 266 276 277 if (repeatseek) 278 { 279 Seek(seekpos, seekwhence); 280 repeatseek = false; 281 } 282 267 283 if (blockBuf != dvdBlockWriteBuf) 268 284 { 269 285 dvdnav_free_cache_block(dvdnav, blockBuf); -
libs/libmythtv/DVDRingBuffer.h
142 142 const char *dvdname; 143 143 const char *serialnumber; 144 144 bool jumptotitle; 145 bool repeatseek; 146 long long seekpos; 147 int seekwhence; 145 148 146 149 NuppelVideoPlayer *parent; 147 150