4.0: Android: Crash in video output with mediacodec when switching media quickly
Crash in mediacodec, sample launched with --loop --run-time=2
without any awindow binded. Happened after 3 switches, and then re-happened after the first switch.
********** Crash dump: **********
Build fingerprint: 'OPPO/CPH2195EEA/OP4F39L1:12/SKQ1.210216.001/R.202211081552:user/release-keys'
#00 0x00000000000ed9dc /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so (vlc_mutex_lock+16)
vlc_mutex_trylock
/home/janniaux/Projects/videolabs/vlc/src/misc/threads.c:132:26
vlc_mutex_lock
/home/janniaux/Projects/videolabs/vlc/src/misc/threads.c:113:9
#01 0x00000000000c8e3c /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so
VoutRenderWakeUpUrgent
/home/janniaux/Projects/videolabs/vlc/src/video_output/video_output.c:235:9
vout_ChangeDisplaySize
/home/janniaux/Projects/videolabs/vlc/src/video_output/video_output.c:471:5
#02 0x00000000000d33c0 /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so
vout_display_window_ResizeNotify
/home/janniaux/Projects/videolabs/vlc/src/video_output/video_window.c:85:5
#03 0x00000000000d302c /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so
vout_display_ResizeWindow
/home/janniaux/Projects/videolabs/vlc/src/video_output/video_window.c:379:5
#04 0x00000000000cad20 /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so
vout_UpdateWindowSizeLocked
/home/janniaux/Projects/videolabs/vlc/src/video_output/video_output.c:261:5
EnableWindowLocked
/home/janniaux/Projects/videolabs/vlc/src/video_output/video_output.c:2106:5
vout_Request
/home/janniaux/Projects/videolabs/vlc/src/video_output/video_output.c:2164:9
#05 0x00000000000ba2ec /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so
input_resource_RequestVout
/home/janniaux/Projects/videolabs/vlc/src/input/resource.c:497:9
#06 0x00000000000945a0 /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so
ModuleThread_UpdateVideoFormat
/home/janniaux/Projects/videolabs/vlc/src/input/decoder.c:566:9
#07 0x0000000000096af0 /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so (decoder_UpdateVideoOutput+552)
decoder_UpdateVideoOutput
/home/janniaux/Projects/videolabs/vlc/src/input/decoder_helpers.c:152:12
#08 0x000000000000cca4 /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libmediacodec_plugin.so
Video_ProcessOutput
/home/janniaux/Projects/videolabs/vlc/modules/codec/omxil/mediacodec.c:1254:13
#09 0x000000000000dcb8 /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libmediacodec_plugin.so
OutThread
/home/janniaux/Projects/videolabs/vlc/modules/codec/omxil/mediacodec.c:1477:21
#10 0x00000000000fdba4 /data/app/~~8kXa-sqTE0ZdmywiSvIhvA==/org.videolan.nativesample-hDVjngLpYo3WX0zw1xrsew==/lib/arm64/libvlccore.so
joinable_thread
/home/janniaux/Projects/videolabs/vlc/src/android/thread.c:96:20
#11 0x00000000000deb44 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: bbbdeb7c87c74f1491f92c6e605095b0)
#12 0x000000000007b2fc /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: bbbdeb7c87c74f1491f92c6e605095b0)
Crash dump is completed
Maybe related to !2917 (merged).