[vlc-commits] [Git][videolan/vlc][master] libmpeg2: fix PPC regression

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Sun Aug 1 08:55:03 UTC 2021



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
9fdfdd30 by Lyndon Brown at 2021-07-31T18:30:07+00:00
libmpeg2: fix PPC regression

00d1f50eff60f30ac77ffe8f4df6af4668affcbd introduced a regression for PPC
since the `signal()` based detection for altivec in libmpeg2 is not thread
safe unlike our own. here we restore use of our own detection for PPC,
bypassing libmpeg2's unsafe auto-detection otherwise triggered in
`mpeg2_init()`.

fixes #25948.

- - - - -


1 changed file:

- modules/codec/libmpeg2.c


Changes:

=====================================
modules/codec/libmpeg2.c
=====================================
@@ -197,6 +197,11 @@ static int OpenDecoder( vlc_object_t *p_this )
     p_sys->p_gop_user_data = NULL;
     p_sys->i_gop_user_data = 0;
 
+#if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
+    /* libmpeg's detection is not thread safe for ppc-altivec */
+    mpeg2_accel( vlc_CPU_ALTIVEC() ? MPEG2_ACCEL_PPC_ALTIVEC : 0 );
+#endif
+
     /* Initialize decoder */
     p_sys->p_mpeg2dec = mpeg2_init();
     if( p_sys->p_mpeg2dec == NULL)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9fdfdd302b150e31511f6f4ae903b4640fd76ea4

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9fdfdd302b150e31511f6f4ae903b4640fd76ea4
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list