Skip to content
Snippets Groups Projects
Commit 9fdfdd30 authored by Lyndon Brown's avatar Lyndon Brown Committed by Hugo Beauzée-Luyssen
Browse files

libmpeg2: fix PPC regression

00d1f50e 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.
parent 5219ec95
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment