Hello community,

here is the log from the commit of package libvdpau for openSUSE:Factory 
checked in at 2012-09-13 07:02:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libvdpau (Old)
 and      /work/SRC/openSUSE:Factory/.libvdpau.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libvdpau", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libvdpau/libvdpau.changes        2012-06-26 
17:46:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libvdpau.new/libvdpau.changes   2012-09-13 
07:02:03.000000000 +0200
@@ -1,0 +2,11 @@
+Wed Sep  5 15:58:42 UTC 2012 - [email protected]
+
+- 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. 
+
+-------------------------------------------------------------------

Old:
----
  libvdpau-0.4.1.tar.gz

New:
----
  libvdpau-0.5.tar.gz
  libvdpau-always-workaround-libflash.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libvdpau.spec ++++++
--- /var/tmp/diff_new_pack.qYrttQ/_old  2012-09-13 07:02:05.000000000 +0200
+++ /var/tmp/diff_new_pack.qYrttQ/_new  2012-09-13 07:02:05.000000000 +0200
@@ -17,19 +17,20 @@
 
 
 Name:           libvdpau
-Version:        0.4.1
+Version:        0.5
 Release:        0
 Summary:        VDPAU wrapper and trace libraries
 License:        MIT
 Group:          System/Libraries
 Url:            http://people.freedesktop.org/~aplattner
-Source:         %{name}-%{version}.tar.gz
+Source:         
http://people.freedesktop.org/~aplattner/vdpau/%{name}-%{version}.tar.gz
 Source1:        vdpauinfo-0.0.6.tar.gz
 Source2:        README
 Source99:       baselibs.conf
 Source100:      %{name}-rpmlintrc
 Patch:          vdpauinfo-missing-lX11.diff
 Patch1:         libvdpau-nopdftex.patch
+Patch2:         libvdpau-always-workaround-libflash.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  doxygen
@@ -88,25 +89,30 @@
 pushd ../vdpauinfo-*
 %patch -p0
 popd
+%patch2 -p1
 
 %build
 autoreconf -fi
 %configure
-make %{?jobs:-j%jobs}
+make %{?_smp_mflags}
 
 %install
 %makeinstall
+
 rm %{buildroot}%{_libdir}/libvdpau.la
 rm %{buildroot}%{_libdir}/vdpau/libvdpau_trace.la
 /sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}/vdpau
 rm %{buildroot}%{_libdir}/vdpau/libvdpau_trace.so
+
 pushd ../vdpauinfo-*
 %configure \
 VDPAU_CFLAGS=-I$RPM_BUILD_ROOT/usr/include \
 VDPAU_LIBS="-L$RPM_BUILD_ROOT/%{_libdir} -lvdpau -lX11"
-make %{?jobs:-j%jobs}
+
+make %{?_smp_mflags}
 %makeinstall
 popd
+
 cp $RPM_SOURCE_DIR/README .
 
 %post -n libvdpau1 -p /sbin/ldconfig
@@ -118,6 +124,7 @@
 %dir %{_libdir}/vdpau
 /usr/bin/vdpauinfo
 %{_libdir}/libvdpau.so.*
+%config /etc/vdpau_wrapper.cfg
 
 %files -n libvdpau-devel
 %defattr(-,root,root)

++++++ libvdpau-0.4.1.tar.gz -> libvdpau-0.5.tar.gz ++++++
++++ 22879 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libvdpau-0.4.1/AUTHORS new/libvdpau-0.5/AUTHORS
--- old/libvdpau-0.4.1/AUTHORS  2010-09-07 19:21:32.000000000 +0200
+++ new/libvdpau-0.5/AUTHORS    2012-09-04 19:26:33.000000000 +0200
@@ -1,2 +1,4 @@
 Stephen Warren
 Aaron Plattner
+Anssi Hannula
+Kiran Pawar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libvdpau-0.4.1/ChangeLog new/libvdpau-0.5/ChangeLog
--- old/libvdpau-0.4.1/ChangeLog        2010-09-08 19:10:35.000000000 +0200
+++ new/libvdpau-0.5/ChangeLog  2012-09-04 19:29:09.000000000 +0200
@@ -1,3 +1,62 @@
+commit 365566616381f7219f7fa7f603bcd4e96fad41f2
+Author: Aaron Plattner <[email protected]>
+Date:   Tue Sep 4 09:32:35 2012 -0700
+
+    Bump version to 0.5
+    
+    Also add authors to the AUTHORS file.
+    
+    Signed-off-by: Aaron Plattner <[email protected]>
+
+commit ca9e637c61e80145f0625a590c91429db67d0a40
+Author: Stephen Warren <[email protected]>
+Date:   Tue May 1 20:27:24 2012 -0700
+
+    Implement workarounds for Adobe Flash bugs
+    
+    Implement two workarounds:
+    
+    1) Swap U and V planes to VdpVideoSurfacePutBitsYCbCr to fix blue-tinged
+       videos.
+    
+    2) Disable VdpPresentationQueueSetBackgroundColor, so that Flash doesn't
+       set the background to pure black or pure white, which would cause the
+       VDPAU image to bleed through to other parts of the desktop with those
+       very common colors.
+    
+    These workarounds are only enabled when running under Flash player, and
+    may be individually controlled via /etc/vdpau_wrapper.cfg, should they
+    ever need to be disabled.
+    
+    Note that this code stores the VDPAU backend function pointers as global
+    variables, which is technically incorrect. However, the likelihood of
+    any known VDPAU implementation ever returning different values for these
+    pointers within a single process is zero. If this becomes a problem, a
+    hash table of VdpDevice to the stored pointers should be implemented.
+    
+    Signed-off-by: Stephen Warren <[email protected]>
+    Reviewed-by: Aaron Plattner <[email protected]>
+    Signed-off-by: Aaron Plattner <[email protected]>
+    [[email protected]: fixed distcheck by changing it to 
dist_libvdpausysconf_DATA]
+
+commit 4262513e67c3572ed19bd796ec6180cdde7ccb7e
+Author: Kiran Pawar <[email protected]>
+Date:   Fri Aug 5 11:45:18 2011 +0530
+
+    vdpau_wrapper.c: Track dynamic library handles and free them on exit using 
__attribute__((destructor))
+    
+    Signed-off-by: Kiran Pawar <[email protected]>
+    Tested-by: Aaron Plattner <[email protected]>
+    Signed-off-by: Aaron Plattner <[email protected]>
+
+commit c4a2273edb161c2e3c7847a91db4aa514c073fe3
+Author: Aaron Plattner <[email protected]>
+Date:   Wed Sep 8 10:11:28 2010 -0700
+
+    Bump version to 0.4.1
+    
+    Signed-off-by: Aaron Plattner <[email protected]>
+
 commit 581d8bbcd36b85fb368446180053204118829fc1
 Author: Anssi Hannula <[email protected]>
 Date:   Sun Sep 5 13:04:17 2010 +0300
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libvdpau-0.4.1/configure.ac new/libvdpau-0.5/configure.ac
--- old/libvdpau-0.4.1/configure.ac     2010-09-08 19:06:39.000000000 +0200
+++ new/libvdpau-0.5/configure.ac       2012-09-04 19:26:33.000000000 +0200
@@ -1,6 +1,6 @@
 AC_PREREQ(2.60)
 
-AC_INIT(libvdpau, 0.4.1, [[email protected]], libvdpau)
+AC_INIT(libvdpau, 0.5, [[email protected]], libvdpau)
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libvdpau-0.4.1/missing new/libvdpau-0.5/missing
--- old/libvdpau-0.4.1/missing  2010-09-08 19:07:03.000000000 +0200
+++ new/libvdpau-0.5/missing    2012-09-04 18:50:22.000000000 +0200
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.13; # UTC
 
 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <[email protected]>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,6 @@
   help2man     touch the output file
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@@ -122,15 +121,6 @@
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
   *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
@@ -226,7 +216,7 @@
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -256,7 +246,7 @@
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -318,41 +308,6 @@
     touch $file
     ;;
 
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case $firstarg in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case $firstarg in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
   *)
     echo 1>&2 "\
 WARNING: \`$1' is needed, and is $msg.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libvdpau-0.4.1/src/Makefile.am new/libvdpau-0.5/src/Makefile.am
--- old/libvdpau-0.4.1/src/Makefile.am  2010-09-07 19:21:32.000000000 +0200
+++ new/libvdpau-0.5/src/Makefile.am    2012-09-04 19:26:33.000000000 +0200
@@ -1,6 +1,7 @@
 AM_CFLAGS = \
     -I$(top_srcdir)/include \
     -DVDPAU_MODULEDIR="\"$(moduledir)\"" \
+    -DVDPAU_SYSCONFDIR="\"$(sysconfdir)\"" \
     $(X11_CFLAGS) \
     $(XEXT_CFLAGS)
 
@@ -26,3 +27,6 @@
 libvdpauinclude_HEADERS = \
     $(top_srcdir)/include/vdpau/vdpau.h \
     $(top_srcdir)/include/vdpau/vdpau_x11.h
+
+libvdpausysconfdir=$(sysconfdir)
+dist_libvdpausysconf_DATA = vdpau_wrapper.cfg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libvdpau-0.4.1/src/vdpau_wrapper.c new/libvdpau-0.5/src/vdpau_wrapper.c
--- old/libvdpau-0.4.1/src/vdpau_wrapper.c      2010-09-07 19:21:32.000000000 
+0200
+++ new/libvdpau-0.5/src/vdpau_wrapper.c        2012-09-04 19:26:33.000000000 
+0200
@@ -40,6 +40,17 @@
     void * driver_dll_handle
 );
 
+static void * _vdp_backend_dll;
+static void * _vdp_trace_dll;
+static void * _vdp_driver_dll;
+static VdpDeviceCreateX11 * _vdp_imp_device_create_x11_proc;
+
+#if defined(__GNUC__)
+
+static void _vdp_close_driver(void) __attribute__((destructor));
+
+#endif
+
 #if DEBUG
 
 static void _vdp_wrapper_error_breakpoint(char const * file, int line, char 
const * function)
@@ -87,23 +98,16 @@
     return driver_name;
 }
 
-VdpStatus vdp_device_create_x11(
+static VdpStatus _vdp_open_driver(
     Display *             display,
-    int                   screen,
-    /* output parameters follow */
-    VdpDevice *           device,
-    VdpGetProcAddress * * get_proc_address
-)
+    int                   screen)
 {
     char const * vdpau_driver;
     char * vdpau_driver_dri2 = NULL;
     char         vdpau_driver_lib[PATH_MAX];
-    void *       backend_dll;
     char const * vdpau_trace;
     char const * func_name;
 
-    VdpDeviceCreateX11 * vdp_imp_device_create_x11;
-
     vdpau_driver = getenv("VDPAU_DRIVER");
     if (!vdpau_driver) {
         vdpau_driver = vdpau_driver_dri2 =
@@ -125,13 +129,13 @@
         return VDP_STATUS_NO_IMPLEMENTATION;
     }
 
-    backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
-    if (!backend_dll) {
+    _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
+    if (!_vdp_driver_dll) {
         /* Try again using the old path, which is guaranteed to fit in PATH_MAX
          * if the complete path fit above. */
         snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT,
                  "", vdpau_driver, "");
-        backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
+        _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
     }
 
     if (vdpau_driver_dri2) {
@@ -139,26 +143,28 @@
         vdpau_driver_dri2 = NULL;
     }
 
-    if (!backend_dll) {
+    if (!_vdp_driver_dll) {
         fprintf(stderr, "Failed to open VDPAU backend %s\n", dlerror());
         _VDP_ERROR_BREAKPOINT();
         return VDP_STATUS_NO_IMPLEMENTATION;
     }
 
+    _vdp_backend_dll = _vdp_driver_dll;
+
     vdpau_trace = getenv("VDPAU_TRACE");
     if (vdpau_trace && atoi(vdpau_trace)) {
-        void *         trace_dll;
         SetDllHandle * set_dll_handle;
 
-        trace_dll = dlopen(VDPAU_MODULEDIR "/libvdpau_trace.so.1", RTLD_NOW | 
RTLD_GLOBAL);
-        if (!trace_dll) {
+        _vdp_trace_dll = dlopen(VDPAU_MODULEDIR "/libvdpau_trace.so.1",
+                                RTLD_NOW | RTLD_GLOBAL);
+        if (!_vdp_trace_dll) {
             fprintf(stderr, "Failed to open VDPAU trace library %s\n", 
dlerror());
             _VDP_ERROR_BREAKPOINT();
             return VDP_STATUS_NO_IMPLEMENTATION;
         }
 
         set_dll_handle = (SetDllHandle*)dlsym(
-            trace_dll,
+            _vdp_trace_dll,
             "vdp_trace_set_backend_handle"
         );
         if (!set_dll_handle) {
@@ -167,9 +173,9 @@
             return VDP_STATUS_NO_IMPLEMENTATION;
         }
 
-        set_dll_handle(backend_dll);
+        set_dll_handle(_vdp_backend_dll);
 
-        backend_dll = trace_dll;
+        _vdp_backend_dll = _vdp_trace_dll;
 
         func_name = "vdp_trace_device_create_x11";
     }
@@ -177,20 +183,221 @@
         func_name = "vdp_imp_device_create_x11";
     }
 
-    vdp_imp_device_create_x11 = (VdpDeviceCreateX11*)dlsym(
-        backend_dll,
+    _vdp_imp_device_create_x11_proc = (VdpDeviceCreateX11*)dlsym(
+        _vdp_backend_dll,
         func_name
     );
-    if (!vdp_imp_device_create_x11) {
+    if (!_vdp_imp_device_create_x11_proc) {
         fprintf(stderr, "%s\n", dlerror());
         _VDP_ERROR_BREAKPOINT();
         return VDP_STATUS_NO_IMPLEMENTATION;
     }
 
-    return vdp_imp_device_create_x11(
+    return VDP_STATUS_OK;
+}
+
+static void _vdp_close_driver(void)
+{
+    if (_vdp_driver_dll) {
+        dlclose(_vdp_driver_dll);
+        _vdp_driver_dll = NULL;
+    }
+    if (_vdp_trace_dll) {
+        dlclose(_vdp_trace_dll);
+        _vdp_trace_dll = NULL;
+    }
+    _vdp_backend_dll = NULL;
+    _vdp_imp_device_create_x11_proc = NULL;
+}
+
+static VdpGetProcAddress * _imp_get_proc_address;
+static VdpVideoSurfacePutBitsYCbCr * _imp_vid_put_bits_y_cb_cr;
+static VdpPresentationQueueSetBackgroundColor * _imp_pq_set_bg_color;
+static int _inited_fixes;
+static int _running_under_flash;
+static int _enable_flash_uv_swap = 1;
+static int _disable_flash_pq_bg_color = 1;
+
+static VdpStatus vid_put_bits_y_cb_cr_swapped(
+    VdpVideoSurface      surface,
+    VdpYCbCrFormat       source_ycbcr_format,
+    void const * const * source_data,
+    uint32_t const *     source_pitches
+)
+{
+    void const * data_reordered[3];
+    void const * const * data;
+
+    if (source_ycbcr_format == VDP_YCBCR_FORMAT_YV12) {
+        data_reordered[0] = source_data[0];
+        data_reordered[1] = source_data[2];
+        data_reordered[2] = source_data[1];
+        /*
+         * source_pitches[1] and source_pitches[2] should be equal,
+         * so no need to re-order.
+         */
+        data = data_reordered;
+    }
+    else {
+        data = source_data;
+    }
+
+    return _imp_vid_put_bits_y_cb_cr(
+        surface,
+        source_ycbcr_format,
+        data,
+        source_pitches
+    );
+}
+
+static VdpStatus pq_set_bg_color_noop(
+    VdpPresentationQueue presentation_queue,
+    VdpColor * const     background_color
+)
+{
+    return VDP_STATUS_OK;
+}
+
+static VdpStatus vdp_wrapper_get_proc_address(
+    VdpDevice device,
+    VdpFuncId function_id,
+    /* output parameters follow */
+    void * *  function_pointer
+)
+{
+    VdpStatus status;
+
+    status = _imp_get_proc_address(device, function_id, function_pointer);
+    if (status != VDP_STATUS_OK) {
+        return status;
+    }
+
+    if (_running_under_flash) {
+        switch (function_id) {
+        case VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR:
+            if (_enable_flash_uv_swap) {
+                _imp_vid_put_bits_y_cb_cr = *function_pointer;
+                *function_pointer = vid_put_bits_y_cb_cr_swapped;
+            }
+            break;
+        case VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR:
+            if (_disable_flash_pq_bg_color) {
+                _imp_pq_set_bg_color = *function_pointer;
+                *function_pointer = pq_set_bg_color_noop;
+            }
+            break;
+        default:
+            break;
+        }
+    }
+
+    return VDP_STATUS_OK;
+}
+
+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;
+    }
+}
+
+void init_config(void)
+{
+    FILE *fp;
+    char buffer[1024];
+    int ret;
+
+    fp = fopen(VDPAU_SYSCONFDIR "/vdpau_wrapper.cfg", "r");
+    if (!fp) {
+        return;
+    }
+
+    while (fgets(buffer, sizeof(buffer), fp) != NULL) {
+        char * equals = strchr(buffer, '=');
+        char * param;
+
+        if (equals == NULL) {
+            continue;
+        }
+
+        *equals = '\0';
+        param = equals + 1;
+
+        if (!strcmp(buffer, "enable_flash_uv_swap")) {
+            _enable_flash_uv_swap = atoi(param);
+        }
+        else if (!strcmp(buffer, "disable_flash_pq_bg_color")) {
+            _disable_flash_pq_bg_color = atoi(param);
+        }
+    }
+}
+
+void init_fixes(void)
+{
+    if (_inited_fixes) {
+        return;
+    }
+    _inited_fixes = 1;
+
+    init_running_under_flash();
+    init_config();
+}
+
+VdpStatus vdp_device_create_x11(
+    Display *             display,
+    int                   screen,
+    /* output parameters follow */
+    VdpDevice *           device,
+    VdpGetProcAddress * * get_proc_address
+)
+{
+    VdpStatus status;
+
+    init_fixes();
+
+    if (!_vdp_imp_device_create_x11_proc) {
+        status = _vdp_open_driver(display, screen);
+        if (status != VDP_STATUS_OK) {
+            _vdp_close_driver();
+            return status;
+        }
+    }
+
+    status = _vdp_imp_device_create_x11_proc(
         display,
         screen,
         device,
-        get_proc_address
+        &_imp_get_proc_address
     );
+    if (status != VDP_STATUS_OK) {
+        return status;
+    }
+
+    *get_proc_address = vdp_wrapper_get_proc_address;
+
+    return VDP_STATUS_OK;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libvdpau-0.4.1/src/vdpau_wrapper.cfg new/libvdpau-0.5/src/vdpau_wrapper.cfg
--- old/libvdpau-0.4.1/src/vdpau_wrapper.cfg    1970-01-01 01:00:00.000000000 
+0100
+++ new/libvdpau-0.5/src/vdpau_wrapper.cfg      2012-09-04 19:26:33.000000000 
+0200
@@ -0,0 +1,2 @@
+enable_flash_uv_swap=1
+disable_flash_pq_bg_color=1

++++++ libvdpau-always-workaround-libflash.patch ++++++
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)
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to