diff options
author | gpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-07 09:19:36 +0000 |
---|---|---|
committer | gpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-07 09:19:36 +0000 |
commit | 306f6243fdf6007e6e1bbef413de0128a22e47b8 (patch) | |
tree | 7add115ae80486aa2442c69bfa06ff06e880be17 /libmpcodecs/vd_ffmpeg.c | |
parent | 196bee14d3cc83d083623ce29f2f238e54037628 (diff) | |
download | mpv-306f6243fdf6007e6e1bbef413de0128a22e47b8.tar.bz2 mpv-306f6243fdf6007e6e1bbef413de0128a22e47b8.tar.xz |
Fix ratio aspect on Matroska files, broken with recent 'spect change in DVB' patch
patch by Carl Eugen Hoyos % cehoyos A ag P or P at %
Original thread:
Subj: [MPlayer-dev-eng] [PATCH] Fix aspect in mkv
Date: 03/05/2007 02:01 PM
Bug report report:
http://lists.mplayerhq.hu/pipermail/mplayer-users/2007-March/065823.html
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22484 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index c1c1c085d7..047463fee4 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -504,8 +504,11 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ !ctx->vo_inited) { mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect); + if (sh->aspect == 0 || + av_cmp_q(avctx->sample_aspect_ratio, + ctx->last_sample_aspect_ratio)) + sh->aspect = aspect; ctx->last_sample_aspect_ratio = avctx->sample_aspect_ratio; - sh->aspect = aspect; sh->disp_w = width; sh->disp_h = height; ctx->pix_fmt = pix_fmt; |