Fix mov subtitle when mdhd timescale≠1000

master
jcdr428 2022-07-24 14:36:16 +01:00
parent fafc3cd747
commit 67bc5b9473
1 changed files with 3 additions and 3 deletions

View File

@ -45,8 +45,8 @@ static const char* const mov_mdhd_language_map[] = {
struct MOVStts struct MOVStts
{ {
int count; uint32_t count;
int duration; uint64_t duration;
}; };
struct MOVDref struct MOVDref
@ -402,7 +402,7 @@ class MovParsedSRTTrackData : public ParsedTrackPrivData
sttsCnt = m_sc->stts_data[sttsPos].count; sttsCnt = m_sc->stts_data[sttsPos].count;
} }
sttsCnt--; sttsCnt--;
return m_sc->stts_data[sttsPos].duration; return m_sc->stts_data[sttsPos].duration * 1000 / m_sc->time_scale;
} }
void setPrivData(uint8_t* buff, int size) override void setPrivData(uint8_t* buff, int size) override