You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	vda: fix crash when a frame is dropped.
Signed-off-by: Sebastien Zwickert <dilaroga@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Sebastien Zwickert
						Sebastien Zwickert
					
				
			
			
				
	
			
			
			
						parent
						
							05e5bb6107
						
					
				
				
					commit
					31a0ca9e75
				
			| @@ -41,6 +41,12 @@ | ||||
|  | ||||
| #include "libavcodec/version.h" | ||||
|  | ||||
| // extra flags not defined in VDADecoder.h | ||||
| enum { | ||||
|     kVDADecodeInfo_Asynchronous = 1UL << 0, | ||||
|     kVDADecodeInfo_FrameDropped = 1UL << 1 | ||||
| }; | ||||
|  | ||||
| /** | ||||
|  * @defgroup lavc_codec_hwaccel_vda VDA | ||||
|  * @ingroup lavc_codec_hwaccel | ||||
|   | ||||
| @@ -41,6 +41,9 @@ static void vda_decoder_callback(void *vda_hw_ctx, | ||||
| { | ||||
|     struct vda_context *vda_ctx = vda_hw_ctx; | ||||
|  | ||||
|     if (infoFlags & kVDADecodeInfo_FrameDropped) | ||||
|         vda_ctx->cv_buffer = NULL; | ||||
|  | ||||
|     if (!image_buffer) | ||||
|         return; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user