diff options
author | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:07 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:07 +0000 |
commit | 8eb1915395eb8f88d67a6d70a23eaeea35e0969a (patch) | |
tree | bb782e23bbcd5cff35d89c3303eaba775536ef33 /libavformat | |
parent | 5045da831bb91ed094f2ff48bb424eb7535f6c32 (diff) | |
download | ffmpeg-8eb1915395eb8f88d67a6d70a23eaeea35e0969a.tar.gz |
Calculate and store DAR rather than SAR
Originally committed as revision 10361 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskaenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 93b62f8d8b..294f98f257 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -552,8 +552,9 @@ static int mkv_write_tracks(AVFormatContext *s) 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; |