2012-02-05, 19:26
a11599 Wrote:I just have two movies with dts-ma so that's all I could test but one thing I noticed is that the audio packets are calculated to be of 170.67 ms duration in CDVDPlayerAudio:: DecodeFrame() because audioframe.size is 32768 (it is 2048 for dts core). The invalid duration can cause audio sync issues with drop/dupe packet sync method. I think the packet duration should be the same 10.67 ms for all (?) dts fomats because HD formats are "just" added on top of core so it seems logical that the duration is also the same (although I was unable to find any specs on this).Thanks for testing! While I have cherry-picked your patch into my repo to play with it for a while, I came to the conclusion that neither the original code nor your fix is correct - for two reasons:
- The idea of calculating the duration of an audio frame is a linear function of the size of a chunk of data is true for coding schemes with constant coding gain only. None of the codecs in question has this property. Thusly the calculated duration is a raw estimate - at best. Even more so after pushing it through the output muxer.
- The DTS coding scheme has a multiple frame sizes (but I may be wrong here)