obs-studio/deps/media-playback
jp9000 f8cc3bfe01 deps/media-playback: Fix audio segment duration calc
With certain audio encoders, gaps can be introduced into the audio
packets, causing the audio duration to be miscalculated because it
calculated audio duration based upon the PTS of the current packet to
the last packet. However, this audio encoder also did not store
timestamps for most of its audio packets, causing PTS values to be
calculated based upon duration values. So those two things combined
caused audio timestamps to go all out of whack when playing back certain
videos with the media source. This is particularly prevalent with WMV
files using Microsoft codecs.

So to fix it, when the duration needs to be calculated, just calculate
the duration based upon the sample count of the audio packet. This fixes
the issue with the video in question that caused problems, and likely
fixes issues in a lot of videos that may have been floating out there
for some time. Basically this is a fix for a potential long-standing
issue.

Closes obsproject/obs-studio#3683
2020-11-15 04:57:41 -08:00
..
media-playback deps/media-playback: Fix audio segment duration calc 2020-11-15 04:57:41 -08:00
CMakeLists.txt CMake: Set PIC for all library targets 2020-09-09 01:55:50 +02:00