Changeset 1177:6a8f9aa8bcf1 in mediastreamer2


Ignore:
Timestamp:
Oct 20, 2010 9:32:56 PM (3 years ago)
Author:
Simon Morlat <simon.morlat@…>
Branch:
default
Message:

fix crash when x11 window is too small, and improve Xv detection in configure script

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • acinclude.m4

    r1167 r1177  
    153153 
    154154                        if test "$enable_xv" = "true"; then 
    155                            AC_CHECK_HEADERS(X11/extensions/Xv.h,[] ,[enable_xv=false]) 
     155                                AC_CHECK_HEADERS(X11/extensions/Xv.h,[] ,[enable_xv=false]) 
     156                                AC_CHECK_HEADERS(X11/extensions/Xvlib.h,[] ,[enable_xv=false],[ 
     157                                        #include <X11/Xlib.h> 
     158                                ]) 
    156159                           AC_CHECK_LIB(Xv,XvCreateImage,[LIBS="$LIBS -lXv"]) 
    157160                         fi 
     
    159162                 
    160163                if ! test "$mingw_found" = "yes" ; then 
    161                         if test "$enable_xv$sdl_found" == "nono" ; then 
     164                        if test "$enable_xv$sdl_found" == "falsefalse" ; then 
    162165                                AC_MSG_ERROR([No video output API found. Install either X11+Xv headers or SDL library.]) 
    163166                        fi 
  • src/layouts.h

    r1165 r1177  
    2727#endif 
    2828 
     29#define MS_LAYOUT_MIN_SIZE 40 
     30 
    2931void ms_layout_compute(MSVideoSize wsize, MSVideoSize vsize, MSVideoSize orig_psize, 
    3032                       int localrect_pos, float scalefactor, MSRect *mainrect, MSRect *localrect); 
  • src/x11video.c

    r1172 r1177  
    182182        XGetWindowAttributes(s->display,s->window_id,&wa); 
    183183        ms_message("Window has size %i,%i",wa.width,wa.height); 
     184 
     185        if (wa.width<MS_LAYOUT_MIN_SIZE || wa.height<MS_LAYOUT_MIN_SIZE){ 
     186                return; 
     187        } 
    184188         
    185189        s->fbuf.w=wa.width & ~0x1; 
Note: See TracChangeset for help on using the changeset viewer.