You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avconv: vda: Unlock the pixel buffer once it is accessed
Avoid possible issues with memmapped hardware buffers in case VDA is not doing a conversion on behalf of the user and make the code more proper as working example. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
		
				
					committed by
					
						 Luca Barbato
						Luca Barbato
					
				
			
			
				
	
			
			
			
						parent
						
							8fcd121b82
						
					
				
				
					commit
					40af330adf
				
			| @@ -76,6 +76,8 @@ static int vda_retrieve_data(AVCodecContext *s, AVFrame *frame) | ||||
|                   data, linesize, vda->tmp_frame->format, | ||||
|                   frame->width, frame->height); | ||||
|  | ||||
|     CVPixelBufferUnlockBaseAddress(pixbuf, kCVPixelBufferLock_ReadOnly); | ||||
|  | ||||
|     ret = av_frame_copy_props(vda->tmp_frame, frame); | ||||
|     if (ret < 0) | ||||
|         return ret; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user