Ticket #373: mplayer-vo-always-honor-resolution-change-1.0pre7try2-1.patch

File mplayer-vo-always-honor-resolution-change-1.0pre7try2-1.patch, 835 bytes (added by bugs@…, 21 years ago)

Changes the vd component to always honor resolution changes

  • libmpcodecs/vd.c

    diff -ru MPlayer-1.0pre7try2-orig/libmpcodecs/vd.c MPlayer-1.0pre7try2/libmpcodecs/vd.c
    old new  
    151151
    152152    if(!sh->disp_w || !sh->disp_h)
    153153        mp_msg(MSGT_DECVIDEO,MSGL_WARN, MSGTR_CodecDidNotSet);
    154     /* XXX: HACK, if sh->disp_* aren't set,
    155      * but we have w and h, set them :: atmos */
    156     if(!sh->disp_w && w)
     154
     155    /* Always set w & h if given - this works around the problem with
     156     * resolution changing mid-stream, for example in MPEG-PES aka DVB
     157     * recordings switches between 720x576 and 704x576 occur. */
     158    if(w)
    157159        sh->disp_w=w;
    158     if(!sh->disp_h && h)
     160    if(h)
    159161        sh->disp_h=h;
    160162
    161163    if(!sh->disp_w || !sh->disp_h)