Always respect w and h params to mpcodecs_config_vo over

sh->disp_w and sh->disp_h, otherwise it will break when the
resolution changes mid-stream, like in
http://samples.mplayerhq.hu/MPEG2/res_change_ffmpeg_aspect.ts


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20687 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-11-05 12:10:44 +00:00
parent fcffd03e9f
commit 710879686b
1 changed files with 2 additions and 6 deletions

View File

@ -140,13 +140,9 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outf
int palette=0;
int vocfg_flags=0;
if(!sh->disp_w || !sh->disp_h)
mp_msg(MSGT_DECVIDEO,MSGL_WARN, MSGTR_CodecDidNotSet);
/* XXX: HACK, if sh->disp_* aren't set,
* but we have w and h, set them :: atmos */
if(!sh->disp_w && w)
if(w)
sh->disp_w=w;
if(!sh->disp_h && h)
if(h)
sh->disp_h=h;
if(!sh->disp_w || !sh->disp_h)