[vlc-devel] commit: RTP: disable preemption during queueing ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Oct 14 18:38:18 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct 14 19:37:16 2009 +0300| [a0665c0cd19cf2f279dba3723d515abc6f80708a] | committer: Rémi Denis-Courmont 

RTP: disable preemption during queueing

This should fix a rare crash:
LibVLC fatal error destroying mutex (16) in thread 17390 at ../../src/misc/pthread.c:188 in vlc_mutex_destroy
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4[0xb7fff933]
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4[0xb7fff9c8]
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4(vlc_mutex_destroy+0x3f)[0xb7fffa39]
/home/remi/videolan/vlc/build/modules/access/rtp/.libs/librtp_plugin.so[0xb5563a41]
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4(__module_unneed+0x29)[0xb7fe414f]
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4[0xb7f9984e]
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4[0xb7fa69fb]
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4[0xb7fa6c0c]
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4[0xb7faeef2]
/home/remi/videolan/vlc/build/src/.libs/libvlccore.so.4[0xb7feb16e]
/lib/i686/cmov/libpthread.so.0[0xb7f324b5]
/lib/i686/cmov/libc.so.6(clone+0x5e)[0xb7eaea5e]

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a0665c0cd19cf2f279dba3723d515abc6f80708a
---

 modules/access/rtp/input.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/access/rtp/input.c b/modules/access/rtp/input.c
index 1ee0a73..6a14b69 100644
--- a/modules/access/rtp/input.c
+++ b/modules/access/rtp/input.c
@@ -198,9 +198,11 @@ void *rtp_thread (void *data)
             autodetect = false;
         }
 
+        int canc = vlc_savecancel ();
         vlc_mutex_lock (&p_sys->lock);
         rtp_queue (demux, p_sys->session, block);
         vlc_mutex_unlock (&p_sys->lock);
+        vlc_restorecancel (canc);
 
         rtp_process (demux);
     }




More information about the vlc-devel mailing list