mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-11-01 04:53:04 +08:00 
			
		
		
		
	pthread: Do not use a half updated context as master for deallocation.
Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -754,7 +754,11 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count) | |||||||
|     park_frame_worker_threads(fctx, thread_count); |     park_frame_worker_threads(fctx, thread_count); | ||||||
|  |  | ||||||
|     if (fctx->prev_thread && fctx->prev_thread != fctx->threads) |     if (fctx->prev_thread && fctx->prev_thread != fctx->threads) | ||||||
|         update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0); |         if (update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0) < 0) { | ||||||
|  |             av_log(avctx, AV_LOG_ERROR, "Final thread update failed\n"); | ||||||
|  |             fctx->prev_thread->avctx->internal->is_copy = fctx->threads->avctx->internal->is_copy; | ||||||
|  |             fctx->threads->avctx->internal->is_copy = 1; | ||||||
|  |         } | ||||||
|  |  | ||||||
|     fctx->die = 1; |     fctx->die = 1; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Niedermayer
					Michael Niedermayer