aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
authorGravatar henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-25 09:20:50 +0000
committerGravatar henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-25 09:20:50 +0000
commit8d6814a3da2ed5577b046a3ad944a40b92eee009 (patch)
tree465a3363b38a8a88ab6e7638a68b0308ae757c83 /libmpcodecs
parent8308e63eb1f9203e53f13698e7a2bfb362ccceaf (diff)
prefer width&height from bitmapinfoheader for h263 streams
fixes playback of some MOV files (http://mplayerhq.hu/pipermail/mplayer-dev-eng/2004-July/027777.html) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15568 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index e18852b13d..edc4730a79 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -467,12 +467,20 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){
#else
float aspect= avctx->aspect_ratio;
#endif
+ int width, height;
+ width = avctx->width;
+ height = avctx->height;
+ if (sh->bih && sh->format == mmioFOURCC('h','2','6','3')) {
+ width = sh->bih->biWidth;
+ height = sh->bih->biHeight;
+ }
+
// it is possible another vo buffers to be used after vo config()
// lavc reset its buffers on width/heigh change but not on aspect change!!!
if (// aspect != ctx->last_aspect ||
- avctx->width != sh->disp_w ||
- avctx->height != sh->disp_h ||
+ width != sh->disp_w ||
+ height != sh->disp_h ||
!ctx->vo_inited)
{
mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect);
@@ -480,8 +488,8 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){
// if(ctx->last_aspect>=0.01 && ctx->last_aspect<100)
if(sh->aspect==0.0)
sh->aspect = ctx->last_aspect;
- sh->disp_w = avctx->width;
- sh->disp_h = avctx->height;
+ sh->disp_w = width;
+ sh->disp_h = height;
ctx->vo_inited=1;
switch(pix_fmt){
// YUVJ are YUV formats that use the full Y range and not just