tsdemux: playback is faster than normal speed for certain files
Submitted by Nirmal Palanisamy
There are some streams in which PCR is present at interval more than 500ms(say for example 1 sec or 1.5 sec) at few positions. When there is a PCR gap of more than 500ms between last PCR and new PCR, a new PCR group is formed. While forming new PCR group, PCR offset is computed with respect to previous group and stored. But this stored PCR offset is not computed properly. And when this group is referred to compute timestamp for a frame, it is done based on first PCR and PCR offset of this group. Since the PCR offset is wrongly stored when forming the group, time stamp computation also goes wrong. PCR offset stored is little less than the right PCR offset. Because of lesser PCR offset, time stamp computed also lesser than actual. Due to this playback ends very fast than the actual duration. And also because of wrong PCR offset for last group(which set during initial scanning), duration of file computed is less than the actual.