[FFmpeg-devel] [PATCH]Grab opaque images from X11

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Nov 12 16:13:51 CET 2011


Hi!

Attached patch fixes ticket #163 for me.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index c2a67d7..2ecf88c 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -537,6 +537,8 @@ x11grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
             av_log (s1, AV_LOG_INFO, "XGetZPixmap() failed\n");
         }
     }
+    if (image->bits_per_pixel == 32)
+        XAddPixel(image, 0xFF000000);
 
     if (s->draw_mouse) {
         paint_mouse_pointer(image, s);


More information about the ffmpeg-devel mailing list