xine-lib patch fails with current cvs

Message ID 42ECBFF1.7040001@syphir.sytes.net
State New
Headers

Commit Message

C.Y.M July 31, 2005, 12:11 p.m. UTC
  Would this change be OK? The following hunk failed with the current
xine-lib.patch so I changed it like this and would like to know if this change
is correct:



Note that the current cvs of xine-lib's pthread_mutex_init is using &attr now
(instead of NULL).

Best Regards,
C.
  

Comments

Reinhard Nissl July 31, 2005, 3:26 p.m. UTC | #1
Hi,

C.Y.M wrote:

> Would this change be OK? The following hunk failed with the current
> xine-lib.patch so I changed it like this and would like to know if this change
> is correct:
> 
> --- xine-lib/src/xine-engine/xine.c.orig        2005-07-31 04:00:10.000000000 -0700
> +++ xine-lib/src/xine-engine/xine.c     2005-07-31 04:12:41.000000000 -0700
> @@ -536,7 +537,7 @@
>     */
>    pthread_mutexattr_init(&attr);
>    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
> -  pthread_mutex_init (&stream->frontend_lock, &attr);
> +  _x_rmutex_init (&stream->frontend_lock);
> 
>    /*
>     * Clear meta/stream info
> 
> 
> Note that the current cvs of xine-lib's pthread_mutex_init is using &attr now
> (instead of NULL).

No, this change is wrong. You'll have to replace all occurencies of 
_x_rmutex_...() with the original functions pthread_mutex_...().

But it's likely, that you'll experience a crash in _x_lock_frontend(). 
This happens at least on my system from time to time and that's why I 
didn't release 0.7.5 yet.

Bye.
  

Patch

--- xine-lib/src/xine-engine/xine.c.orig        2005-07-31 04:00:10.000000000 -0700
+++ xine-lib/src/xine-engine/xine.c     2005-07-31 04:12:41.000000000 -0700
@@ -536,7 +537,7 @@ 
    */
   pthread_mutexattr_init(&attr);
   pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-  pthread_mutex_init (&stream->frontend_lock, &attr);
+  _x_rmutex_init (&stream->frontend_lock);

   /*
    * Clear meta/stream info