Ticket #1043: mythdvd_cleanup3.patch
File mythdvd_cleanup3.patch, 957 bytes (added by , 20 years ago) |
---|
-
libs/libmythtv/DVDRingBuffer.cpp
811 811 812 812 uint DVDRingBufferPriv::GetCurrentTime(void) 813 813 { 814 // Macro to convert Binary Coded Decimal to Decimal815 // Obtained from VLC Code.816 #define BCD2D(__x__) (((__x__ & 0xf0) >> 4) * 10 + (__x__ & 0x0f))817 818 814 dsi_t *dvdnavDsi = dvdnav_get_current_nav_dsi(dvdnav); 819 815 dvd_time_t timeFromCellStart = dvdnavDsi->dsi_gi.c_eltm; 820 uint8_t hours = BCD2D(timeFromCellStart.hour); 821 uint8_t minutes = BCD2D(timeFromCellStart.minute); 822 uint8_t seconds = BCD2D(timeFromCellStart.second); 823 uint currentTime = GetCellStart() + (hours * 3600) + (minutes * 60) + seconds; 816 uint currentTime = GetCellStart() + 817 (uint)(dvdnav_convert_time(&timeFromCellStart) / 90000); 824 818 return currentTime; 825 819 } 826 820