Ticket #13230: 20180227_1100_android_greenline_workaround.patch

File 20180227_1100_android_greenline_workaround.patch, 960 bytes (added by Peter Bennett, 21 months ago)

Workaround by forcing texture format

  • mythtv/libs/libmythtv/openglvideo.cpp

    diff --git a/mythtv/libs/libmythtv/openglvideo.cpp b/mythtv/libs/libmythtv/openglvideo.cpp
    index 0ab57ca..2c00cdb 100644
    a b bool OpenGLVideo::Init(MythRenderOpenGL *glcontext, VideoColourSpace *colourspac 
    183183        videoTextureType = GL_YCBCR_MESA;
    184184    else if ((!shaders || preferYCBCR) && (gl_features & kGLAppleYCbCr))
    185185        videoTextureType = GL_YCBCR_422_APPLE;
     186#ifndef ANDROID
     187    // WORKAROUND - bypass this on Android
     188    // because on Android using texture type MYTHTV_YV12
     189    // results in a green line on bottom and left with
     190    // some videos. It seems to happen on videos that are
     191    // being resized (e.g. play 720p video with 1080p screen).
    186192    else if (glsl && fbos && !(pbos && uyvy) && yv12)
    187193        videoTextureType = MYTHTV_YV12;
     194#endif
    188195    else if (shaders && fbos && uyvy)
    189196        videoTextureType = MYTHTV_UYVY;
    190197