Ticket #1827: dvd_seeking_improvements_v1.patch
File dvd_seeking_improvements_v1.patch, 819 bytes (added by , 18 years ago) |
---|
-
DVDRingBuffer.cpp
136 136 } 137 137 } 138 138 139 /** \fn DVDRingBufferPriv::GetReadPosition() 140 * \brief returns current position in the PGC. 141 */ 139 142 long long DVDRingBufferPriv::GetReadPosition(void) 140 143 { 141 uint32_t pos; 142 uint32_t length; 143 144 if (dvdnav) 145 dvdnav_get_position(dvdnav, &pos, &length); 146 144 uint32_t pos = 0; 145 uint32_t length = 1; 146 if (dvdnav) 147 { 148 if (dvdnav_get_position(dvdnav, &pos, &length) == DVDNAV_STATUS_ERR) 149 { 150 // try one more time 151 usleep(10000); 152 dvdnav_get_position(dvdnav, &pos, &length); 153 } 154 } 147 155 return pos * DVD_BLOCK_SIZE; 148 156 } 149 157