[Ffmpeg-cvslog] CVS: ffmpeg/libavformat matroska.c,1.21,1.22
Michael Niedermayer CVS
michael
Wed Mar 22 11:33:23 CET 2006
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv32518
Modified Files:
matroska.c
Log Message:
fix aspect ratio
Index: matroska.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/matroska.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- matroska.c 30 Jan 2006 23:32:13 -0000 1.21
+++ matroska.c 22 Mar 2006 10:33:21 -0000 1.22
@@ -2272,18 +2272,14 @@
st->codec->width = videotrack->pixel_width;
st->codec->height = videotrack->pixel_height;
if (videotrack->display_width == 0)
- st->codec->sample_aspect_ratio.num =
- videotrack->pixel_width;
- else
- st->codec->sample_aspect_ratio.num =
- videotrack->display_width;
+ videotrack->display_width= videotrack->pixel_width;
if (videotrack->display_height == 0)
- st->codec->sample_aspect_ratio.num =
- videotrack->pixel_height;
- else
- st->codec->sample_aspect_ratio.num =
- videotrack->display_height;
-
+ videotrack->display_height= videotrack->pixel_height;
+ av_reduce(&st->codec->sample_aspect_ratio.num,
+ &st->codec->sample_aspect_ratio.den,
+ st->codec->height * videotrack->display_width,
+ st->codec-> width * videotrack->display_height,
+ 255);
} else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
MatroskaAudioTrack *audiotrack = (MatroskaAudioTrack *)track;
More information about the ffmpeg-cvslog
mailing list