nareix / joy4

Golang audio/video library and streaming server
MIT License
2.66k stars 501 forks source link

Wrong AudioCodecData.PacketDuration return value #117

Open ivanjaros opened 3 years ago

ivanjaros commented 3 years ago

The value returned by this method has to divide the current value by the number of channels. Otherwise the result equals to real length * channels. In other words, 5 seconds long audio with stereo layout(ie. 2 channels) will return value of 10, instead of 5.