diff options
author | laaz <laaz@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-04-10 00:18:41 +0000 |
---|---|---|
committer | laaz <laaz@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-04-10 00:18:41 +0000 |
commit | 32205998de2fe0e230693d3053ef5053646de244 (patch) | |
tree | f8b6da22f028f651fadfa5d0ddb38fdf55e8763f /libvo | |
parent | 473f1b7b0780d24799a1bf54929118073709df4d (diff) |
vo_x11 query_format fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@326 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_x11.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index e636e01fd4..ae39783e43 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -515,7 +515,14 @@ static uint32_t draw_frame( uint8_t *src[] ) static uint32_t query_format( uint32_t format ) { if( !vo_init() ) return 0; // Can't open X11 - if( ( format&IMGFMT_BGR_MASK )==IMGFMT_BGR && ( format&0xFF )==vo_depthonscreen ) return 1; + + if( ( format&IMGFMT_BGR_MASK )==IMGFMT_BGR ){ + int bpp=format&0xFF; + if( bpp==vo_depthonscreen ) return 1; + if( bpp==15 && vo_depthonscreen==16) return 1; // built-in conversion + if( bpp==24 && vo_depthonscreen==32) return 1; // built-in conversion + } + switch( format ) { case IMGFMT_YV12: return 1; |