This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/xawtv3.git tree:
Subject: xawtv: Wait for our window to be configured Author: Hans de Goede <hdego...@redhat.com> Date: Tue Apr 2 10:43:54 2013 +0200 Before this patch it is possible for the main window to not be configured yet when we call init_overlay. When this happens video_gd_start exits without starting the stream because video_gd_configure has not been called yet. This leads to x11/xawtv: do_capture being called with an argument of CAPTURE_OFF, which will then call x11_capture_pixmap -> ng_grabber_get_image which does a read() on the /dev/video# device node, after which starting an mmap stream or doing any further s_fmt calls will fail with EBUSY when using drivers which don't allow mixing read and mmap (ie videobuf2 based drivers). Even with drivers which do allow the mixing and matching waiting is better as it avoids unnecessary stream start/stop and format-renegotiation. Note that this fix avoids xawtv sometimes not starting at all with drivers which don't allow mixing read / mmap, but the snapshot functionality is still broken with such drivers. I'll write a follow-up patch to fix this. Signed-off-by: Hans de Goede <hdego...@redhat.com> x11/xawtv.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) --- http://git.linuxtv.org/xawtv3.git?a=commitdiff;h=f0d84401dfa392ad86d11a76dda1f722269f3eaa diff --git a/x11/xawtv.c b/x11/xawtv.c index 37afcb6..b87f53e 100644 --- a/x11/xawtv.c +++ b/x11/xawtv.c @@ -87,6 +87,7 @@ XtIntervalId audio_timer; XtIntervalId unmute_timer; int unmute_pending = 0; int debug = 0; +int window_configured = 0; char modename[64]; char *progname; @@ -493,14 +494,14 @@ display_subtitle(struct vbi_page *pg, struct vbi_rect *rect) static void resize_event(Widget widget, XtPointer client_data, XEvent *event, Boolean *d) { - static int width = 0, height = 0, first = 1; + static int width = 0, height = 0; char label[64]; switch(event->type) { case ConfigureNotify: - if (first) { + if (!window_configured) { video_gd_init(tv,args.gl); - first = 0; + window_configured = 1; } if (width != event->xconfigure.width || height != event->xconfigure.height) { @@ -1822,7 +1823,8 @@ main(int argc, char *argv[]) channel_menu(); - xt_handle_pending(dpy); + while (!window_configured) + xt_handle_pending(dpy); init_overlay(); set_property(0,NULL,NULL); _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits