[FFmpeg-devel] Exact screen size not working: Re: [PATCH] Fix segfault with x11grab when switching windows. (fwd)

Message ID 20150506100220.GA3484754@phare.normalesup.org
State New
Headers show

Commit Message

Nicolas George May 6, 2015, 10:02 a.m.
Hi. I suspect that this bug affects you too, so in the spirit of cooperation
here is the mail I sent about to ffmpeg-devel.


----- Forwarded message from Nicolas George <george@nsup.org> -----

Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Date: Wed, 6 May 2015 11:55:25 +0200
From: Nicolas George <george@nsup.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] Exact screen size not working: Re: [PATCH] Fix segfault with x11grab when switching windows.

Le septidi 17 floréal, an CCXXIII, davidpbrown a écrit :
> tldr; Using exact screen size doesn't work but less one pixel does.

The attached patch should fix this.

Please feel anyone free to apply without waiting on me.

davidpbrown: in the future, remember that bug reports should go to the users
mailing list or the issue tracker, unless they are accompanied by a patch.

Regards,

Comments

Luca Barbato May 6, 2015, 10:10 a.m. | #1
On 06/05/15 12:02, Nicolas George wrote:
> Hi. I suspect that this bug affects you too, so in the spirit of cooperation
> here is the mail I sent about to ffmpeg-devel.

Looks fine to me, thank you!

lu
Diego Biurrun May 12, 2015, 5:55 p.m. | #2
On Wed, May 06, 2015 at 12:02:20PM +0200, Nicolas George wrote:
> Hi. I suspect that this bug affects you too, so in the spirit of cooperation
> here is the mail I sent about to ffmpeg-devel.

Thank you, Nicolas.

It would be nice if more people from your team worked in that spirit of
cooperation instead of requiring that ffmpeg gsoc students not contribute
to libav.

Diego
Derek Buitenhuis May 12, 2015, 7 p.m. | #3
On 5/12/2015 6:55 PM, Diego Biurrun wrote:
> It would be nice if more people from your team worked in that spirit of
> cooperation instead of requiring that ffmpeg gsoc students not contribute
> to libav.

Requiring that students that air paid to work on ffmpeg, work on ffmpeg,
isn't exactly insane...

- Derek
Diego Biurrun May 13, 2015, 9:37 a.m. | #4
On Tue, May 12, 2015 at 08:00:56PM +0100, Derek Buitenhuis wrote:
> On 5/12/2015 6:55 PM, Diego Biurrun wrote:
> > It would be nice if more people from your team worked in that spirit of
> > cooperation instead of requiring that ffmpeg gsoc students not contribute
> > to libav.
> 
> Requiring that students that air paid to work on ffmpeg, work on ffmpeg,
> isn't exactly insane...

Forbidding them to contribute to libav is OK in your opinion?

Diego
Derek Buitenhuis May 13, 2015, 10:14 a.m. | #5
On 5/13/2015 10:37 AM, Diego Biurrun wrote:
> Forbidding them to contribute to libav is OK in your opinion?

I haven't seen such a thing.

Regardless of that, this is entirely unrelated to the thread at hand
and nothing but trolling. Be less butthurt, it's been years.

Thank you Nicholas for your time. Ignore the troll under the bridge,
please.

- Derek

Patch

diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index 15512cd..166575c 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -533,8 +533,8 @@  static int create_stream(AVFormatContext *s)
     gc  = xcb_get_geometry(c->conn, c->screen->root);
     geo = xcb_get_geometry_reply(c->conn, gc, NULL);
 
-    if (c->x + c->width >= geo->width ||
-        c->y + c->height >= geo->height) {
+    if (c->x + c->width > geo->width ||
+        c->y + c->height > geo->height) {
         av_log(s, AV_LOG_ERROR,
                "Capture area %dx%d at position %d.%d "
                "outside the screen size %dx%d\n",