[FFmpeg-cvslog] Partially revert "avformat/matroskadec: set aspect ratio only when DisplayWidth and DisplayHeight are in pixels"
James Almer
git at videolan.org
Sun Oct 16 20:22:06 EEST 2016
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Oct 16 10:13:45 2016 -0300| [8b59ce0342684a9b2fb0f87d6f191f33a8136619] | committer: James Almer
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 at nsup.org>
Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b59ce0342684a9b2fb0f87d6f191f33a8136619
---
libavformat/matroskadec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 0d17a7e..8847c62 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -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)
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,
&st->sample_aspect_ratio.den,
st->codecpar->height * track->video.display_width * display_width_mul,
More information about the ffmpeg-cvslog
mailing list