diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-02 17:36:33 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-02 17:36:33 +0000 |
commit | d51d909e4cad6d49827ac23b36a99abd8f485eac (patch) | |
tree | 27c87c54b2402523c22e3feca2332292bd714c3b | |
parent | faa7ff213ca3c85b0abde257d5a65b7e4b9c1338 (diff) | |
download | xine-lib-d51d909e4cad6d49827ac23b36a99abd8f485eac.tar.gz xine-lib-d51d909e4cad6d49827ac23b36a99abd8f485eac.tar.bz2 |
Handle invalid port nos. properly (avoids a possible xcbxv segfault).
--HG--
extra : transplant_source : %8AQ%03%86%FE%20%26%92%D2%A6%13g%1E%85%60%14%A0%A9%F3%22
-rw-r--r-- | src/video_out/video_out_xcbxv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index 63313c43a..5064e89ad 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -945,6 +945,8 @@ static int xv_check_yv12(xcb_connection_t *connection, xcb_xv_port_t port) { list_formats_cookie = xcb_xv_list_image_formats(connection, port); list_formats_reply = xcb_xv_list_image_formats_reply(connection, list_formats_cookie, NULL); + if (!list_formats_reply) + return 1; /* no formats listed; probably due to an invalid port no. */ format_it = xcb_xv_list_image_formats_format_iterator(list_formats_reply); for (; format_it.rem; xcb_xv_image_format_info_next(&format_it)) |