fix aspect ratio
Originally committed as revision 5192 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2c9a0285d4
commit
68ca39b21a
@ -2272,18 +2272,14 @@ matroska_read_header (AVFormatContext *s,
|
|||||||
st->codec->width = videotrack->pixel_width;
|
st->codec->width = videotrack->pixel_width;
|
||||||
st->codec->height = videotrack->pixel_height;
|
st->codec->height = videotrack->pixel_height;
|
||||||
if (videotrack->display_width == 0)
|
if (videotrack->display_width == 0)
|
||||||
st->codec->sample_aspect_ratio.num =
|
videotrack->display_width= videotrack->pixel_width;
|
||||||
videotrack->pixel_width;
|
|
||||||
else
|
|
||||||
st->codec->sample_aspect_ratio.num =
|
|
||||||
videotrack->display_width;
|
|
||||||
if (videotrack->display_height == 0)
|
if (videotrack->display_height == 0)
|
||||||
st->codec->sample_aspect_ratio.num =
|
videotrack->display_height= videotrack->pixel_height;
|
||||||
videotrack->pixel_height;
|
av_reduce(&st->codec->sample_aspect_ratio.num,
|
||||||
else
|
&st->codec->sample_aspect_ratio.den,
|
||||||
st->codec->sample_aspect_ratio.num =
|
st->codec->height * videotrack->display_width,
|
||||||
videotrack->display_height;
|
st->codec-> width * videotrack->display_height,
|
||||||
|
255);
|
||||||
} else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
|
} else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
|
||||||
MatroskaAudioTrack *audiotrack = (MatroskaAudioTrack *)track;
|
MatroskaAudioTrack *audiotrack = (MatroskaAudioTrack *)track;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user