X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Fx11grab.c;h=dccbb278a36c75f29a7d6bb03b5f9b6bb8c33b24;hb=35f707abe1bd3b80b1951010539285d4c3a14dba;hp=c2a67d7e626e432c146a8b2e68cc7269ec7132dc;hpb=51bfaa21c85201ab31776a447599349a1ed6e96b;p=ffmpeg diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c index c2a67d7e626..dccbb278a36 100644 --- a/libavdevice/x11grab.c +++ b/libavdevice/x11grab.c @@ -31,11 +31,13 @@ /** * @file - * X11 frame device demuxer by Clemens Fruhwirth - * and Edouard Gomez . + * X11 frame device demuxer + * @author Clemens Fruhwirth + * @author Edouard Gomez */ #include "config.h" +#include "libavformat/internal.h" #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavutil/parseutils.h" @@ -199,7 +201,7 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) ret = AVERROR(ENOMEM); goto out; } - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ screen = DefaultScreen(dpy); @@ -537,6 +539,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);