[FFmpeg-soc] [soc]: r698 - matroska/matroskaenc.c
conrad
subversion at mplayerhq.hu
Sat Aug 11 21:55:20 CEST 2007
Author: conrad
Date: Sat Aug 11 21:55:20 2007
New Revision: 698
Log:
Calculate and store DAR rather than SAR
Modified:
matroska/matroskaenc.c
Modified: matroska/matroskaenc.c
==============================================================================
--- matroska/matroskaenc.c (original)
+++ matroska/matroskaenc.c Sat Aug 11 21:55:20 2007
@@ -552,8 +552,9 @@ static int mkv_write_tracks(AVFormatCont
put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELWIDTH , codec->width);
put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELHEIGHT, codec->height);
if (codec->sample_aspect_ratio.num) {
- put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , codec->sample_aspect_ratio.num);
- put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYHEIGHT, codec->sample_aspect_ratio.den);
+ AVRational dar = av_mul_q(codec->sample_aspect_ratio, (AVRational){codec->width, codec->height});
+ put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , dar.num);
+ put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYHEIGHT, dar.den);
}
end_ebml_master(pb, subinfo);
break;
More information about the FFmpeg-soc
mailing list