Open quink-black opened 2 years ago
Yes, also editlist Media time can be in samples, not in ms.
media_time is still in media time scale units, and the media time scale is sample rate in this case, so media_time equals to sample_number / sample_rate.
Looks like that it would be better to support sgpd
at the same time for having coherent behavior, on my todo-list but this latter is long... :(.
media_time is a signed value, either
int(64) media_time
orint(32) media_time
. There is a special value -1. MediaInfoLib handled it as unsigned:The unit of media_time and segment_duration is different:
Current code use
moov_mvhd_TimeScale
for media_time, which should beStreams[moov_trak_tkhd_TrackID].mdhd_TimeScale
. However, since mdhd comes after edts, we don't know mdhd_TimeScale yet when handle edts. The following patch doesn't work: