On 26/08/14 13:15, Diego Biurrun wrote:
> On Sun, Aug 24, 2014 at 02:18:20PM +0200, Luca Barbato wrote:
>> Fallback to normal XImage on failure.
>
> Fall back on ...
>>
>> --- a/libavdevice/x11grab.c
>> +++ b/libavdevice/x11grab.c
>> @@ -141,6 +141,35 @@ static void x11grab_region_win_init(X11GrabContext *s)
>>
>> +static int setup_shm(AVFormatContext *s, Display *dpy, XImage **image)
>> +{
>> + X11GrabContext *g = s->priv_data;
>
> 'g' is an odd variable name, make it 'c' or 'ctx'.
>
>> @@ -228,33 +257,12 @@ static int x11grab_read_header(AVFormatContext *s1)
>> + if (use_shm && setup_shm(s1, dpy, &image) < 0) {
>> + av_log(s1, AV_LOG_WARNING, "Falling back to XGetImage\n");
>
> Falling back on XGetImage.
>
>> + use_shm = 0;
>> + }
>
> Shouldn't you goto out here instead? The logic flow is changed quite
> a bit, which looks suspicious.
It falls back to normal XImage on failure. I guess I might swap the two
sentences to make clearer what the patch does.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel