Ticket #1897: pip.diff

File pip.diff, 1.4 KB (added by anonymous, 14 years ago)
  • mythtv/libs/libmythtv/videooutbase.cpp

     
    10841084
    10851085    VideoFrame *pipimage = pipplayer->GetCurrentFrame(pipw, piph);
    10861086    float pipVideoAspect = pipplayer->GetVideoAspect();
    1087     uint  pipVideoWidth  = pipplayer->GetVideoWidth();
    1088     uint  pipVideoHeight = pipplayer->GetVideoHeight();
    10891087
    10901088    // If PiP is not initialized to values we like, silently ignore the frame.
    10911089    if ((video_aspect <= 0) || (pipVideoAspect <= 0) ||
     
    11171115        letterAdj  = video_aspect / letterboxed_video_aspect;
    11181116    }
    11191117
    1120     // adjust for non-square pixels on screen
    1121     float dispPixelAdj = (GetDisplayAspect() * video_dim.height()) /
    1122         video_dim.width();
    1123 
    1124     // adjust for non-square pixels in video
    1125     float vidPixelAdj  = pipVideoWidth / (pipVideoAspect * pipVideoHeight);
    1126 
    1127     // set width
    1128     int tmpw = (int) (pip_desired_display_size.height() * pipVideoAspect *
    1129                       vidPixelAdj * dispPixelAdj * letterAdj);
     1118    int tmpw = (int) (((frame->width * db_pip_size) / 100) *
     1119                       (pipVideoAspect / video_aspect) * letterAdj);
    11301120    pip_desired_display_size.setWidth((tmpw >> 1) << 1);
    11311121
    11321122    // Scale the image if we have to...