1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Partially revert "avformat/matroskadec: set aspect ratio only when DisplayWidth and DisplayHeight are in pixels"

The code works just fine regardless of unit, so only make sure DisplayUnit
is not "unknown".

Found-by: Nicolas George <george@nsup.org>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2016-10-16 10:13:45 -03:00
parent 4b0f37dadb
commit 8b59ce0342

View File

@ -2297,7 +2297,7 @@ static int matroska_parse_tracks(AVFormatContext *s)
if (track->video.stereo_mode && track->video.stereo_mode < MATROSKA_VIDEO_STEREOMODE_TYPE_NB) if (track->video.stereo_mode && track->video.stereo_mode < MATROSKA_VIDEO_STEREOMODE_TYPE_NB)
mkv_stereo_mode_display_mul(track->video.stereo_mode, &display_width_mul, &display_height_mul); mkv_stereo_mode_display_mul(track->video.stereo_mode, &display_width_mul, &display_height_mul);
if (track->video.display_unit == MATROSKA_VIDEO_DISPLAYUNIT_PIXELS) { if (track->video.display_unit < MATROSKA_VIDEO_DISPLAYUNIT_UNKNOWN) {
av_reduce(&st->sample_aspect_ratio.num, av_reduce(&st->sample_aspect_ratio.num,
&st->sample_aspect_ratio.den, &st->sample_aspect_ratio.den,
st->codecpar->height * track->video.display_width * display_width_mul, st->codecpar->height * track->video.display_width * display_width_mul,