2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Apply sample_aspect_ratio in streaming.

This commit is contained in:
John Preston
2019-03-05 13:00:49 +04:00
parent 99e96a5b13
commit e2eb9cea00
7 changed files with 58 additions and 20 deletions

View File

@@ -111,6 +111,7 @@ Stream File::Context::initStream(AVMediaType type) {
const auto info = _format->streams[index];
if (type == AVMEDIA_TYPE_VIDEO) {
result.rotation = ReadRotationFromMetadata(info);
result.aspect = ValidateAspectRatio(info->sample_aspect_ratio);
} else if (type == AVMEDIA_TYPE_AUDIO) {
result.frequency = info->codecpar->sample_rate;
if (!result.frequency) {