40 lines
981 B
Diff
40 lines
981 B
Diff
|
Index: libvdpau-0.5/src/vdpau_wrapper.c
|
||
|
===================================================================
|
||
|
--- libvdpau-0.5.orig/src/vdpau_wrapper.c
|
||
|
+++ libvdpau-0.5/src/vdpau_wrapper.c
|
||
|
@@ -296,33 +296,7 @@ static VdpStatus vdp_wrapper_get_proc_ad
|
||
|
|
||
|
static void init_running_under_flash(void)
|
||
|
{
|
||
|
- FILE *fp;
|
||
|
- char buffer[1024];
|
||
|
- int ret, i;
|
||
|
-
|
||
|
- fp = fopen("/proc/self/cmdline", "r");
|
||
|
- if (!fp) {
|
||
|
- return;
|
||
|
- }
|
||
|
- ret = fread(buffer, 1, sizeof(buffer) - 1, fp);
|
||
|
- fclose(fp);
|
||
|
- if (ret < 0) {
|
||
|
- return;
|
||
|
- }
|
||
|
- /*
|
||
|
- * Sometimes the file contains null between arguments. Wipe these out so
|
||
|
- * strstr doesn't stop early.
|
||
|
- */
|
||
|
- for (i = 0; i < ret; i++) {
|
||
|
- if (buffer[i] == '\0') {
|
||
|
- buffer[i] = 'x';
|
||
|
- }
|
||
|
- }
|
||
|
- buffer[ret] = '\0';
|
||
|
-
|
||
|
- if (strstr(buffer, "libflashplayer") != NULL) {
|
||
|
- _running_under_flash = 1;
|
||
|
- }
|
||
|
+ _running_under_flash = 1;
|
||
|
}
|
||
|
|
||
|
void init_config(void)
|