Ticket #6514: mythtv-simple-xv-video-fix.patch

File mythtv-simple-xv-video-fix.patch, 1.5 KB (added by anonymous, 15 years ago)

Xlib create buffer fix

  • videoout_xv.cpp

    old new  
    21992199
    22002200            X11L;
    22012201
    2202             int bytes_per_line = XJ_depth / 8 * display_visible_rect.width();
     2202            int bytes_per_line;
    22032203            int scrn = DefaultScreen(XJ_disp);
    22042204            Visual *visual = DefaultVisual(XJ_disp, scrn);
    22052205            XJ_non_xv_image = XCreateImage(XJ_disp, visual, XJ_depth,
    22062206                                           ZPixmap, /*offset*/0, /*data*/0,
    22072207                                           display_visible_rect.width(),
    22082208                                           display_visible_rect.height(),
    2209                                            /*bitmap_pad*/0,
    2210                                            bytes_per_line);
     2209                                           /*bitmap_pad*/8,0);
    22112210
    22122211            X11U;
    22132212
     
    22182217                        <<"                        "
    22192218                        <<"XJ_depth("<<XJ_depth<<") "
    22202219                        <<"WxH("<<display_visible_rect.width()
    2221                         <<"x"<<display_visible_rect.height()<<") "
    2222                         <<"bpl("<<bytes_per_line<<")");
     2220                        <<"x"<<display_visible_rect.height()<<")");
    22232221                return false;
    22242222            }
     2223            bytes_per_line = XJ_non_xv_image->bytes_per_line;
    22252224            XJ_non_xv_image->data = (char*) malloc(
    22262225                bytes_per_line * display_visible_rect.height());
    22272226        }