libvdpau/libvdpau-always-workaround-libflash.patch
Stephan Kulow c3216bdee9 Accepting request 133166 from X11:Drivers:Video
- Update to v0.5
  * vdpau_wrapper.c: Track dynamic library handles and free them 
    on exit
  * Implement workarounds for Adobe Flash bugs
- Add libvdpau-alway-workaround-libflash.patch: always enable
  Flash workarounds and not depend on kernel command line. Users
  can disable this in the /etc/vdpau_wrapper.cfg file. (forwarded request 132823 from namtrac)

OBS-URL: https://build.opensuse.org/request/show/133166
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvdpau?expand=0&rev=19
2012-09-13 05:02:01 +00:00

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)