Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 473084 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/vdpau_wrapper.c (-2 / +26 lines)
Lines 301-312 static void init_running_under_flash(void) Link Here
301
{
301
{
302
    FILE *fp;
302
    FILE *fp;
303
    char buffer[1024];
303
    char buffer[1024];
304
    int ret, i;
304
    int _running_under_opera = 0, ret, i;
305
305
306
    /* Check for processes that list libflashplayer in argv() */
306
    fp = fopen("/proc/self/cmdline", "r");
307
    fp = fopen("/proc/self/cmdline", "r");
307
    if (!fp) {
308
    if (!fp) {
308
        return;
309
        return;
309
    }
310
    }
311
310
    ret = fread(buffer, 1, sizeof(buffer) - 1, fp);
312
    ret = fread(buffer, 1, sizeof(buffer) - 1, fp);
311
    fclose(fp);
313
    fclose(fp);
312
    if (ret < 0) {
314
    if (ret < 0) {
Lines 323-331 static void init_running_under_flash(void) Link Here
323
    }
325
    }
324
    buffer[ret] = '\0';
326
    buffer[ret] = '\0';
325
327
328
    if (strstr(buffer, "operapluginwrapper") != NULL) {
329
        _running_under_opera = 1;
330
    }
326
    if (strstr(buffer, "libflashplayer") != NULL) {
331
    if (strstr(buffer, "libflashplayer") != NULL) {
327
        _running_under_flash = 1;
332
        _running_under_flash = 1;
328
    }
333
    }
334
335
    if(!_running_under_opera) {
336
        return;
337
    }
338
    
339
    /* Check for operapluginwrapper which does not list libflashplayer in argv()
340
     * Check maps instead */
341
    fp = fopen("/proc/self/maps", "r");
342
    if (!fp) {
343
        return;
344
    }
345
346
    while(fgets(buffer, sizeof(buffer), fp)) {
347
        if (strstr(buffer, "libflashplayer") != NULL) {
348
            _running_under_flash = 1;
349
            break;
350
        }
351
    }
352
353
    fclose(fp);
329
}
354
}
330
355
331
static void init_config(void)
356
static void init_config(void)
332
- 

Return to bug 473084