Mercurial > mplayer.hg
diff libmpdemux/demux_lavf.c @ 27447:d35a61df7122
use new lavf API to grab sample_aspect_ratio from the demuxers
author | aurel |
---|---|
date | Sun, 24 Aug 2008 00:07:09 +0000 |
parents | a54c51af6595 |
children | 5137a84907a1 |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Sat Aug 23 08:14:37 2008 +0000 +++ b/libmpdemux/demux_lavf.c Sun Aug 24 00:07:09 2008 +0000 @@ -343,6 +343,10 @@ sh_video->fps=av_q2d(st->r_frame_rate); sh_video->frametime=1/av_q2d(st->r_frame_rate); sh_video->format=bih->biCompression; + if(st->sample_aspect_ratio.num) + sh_video->aspect = codec->width * st->sample_aspect_ratio.num + / (float)(codec->height * st->sample_aspect_ratio.den); + else sh_video->aspect=codec->width * codec->sample_aspect_ratio.num / (float)(codec->height * codec->sample_aspect_ratio.den); sh_video->i_bps=codec->bit_rate/8;