mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-11-01 04:53:04 +08:00 
			
		
		
		
	avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failure
We still own it on failure, and there's no point trying to feed it again. This should address the issue reported in dav1d #383 and part of VLC #26259. Signed-off-by: James Almer <jamrial@gmail.com> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
		| @@ -347,8 +347,10 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) | ||||
|     if (res < 0) { | ||||
|         if (res == AVERROR(EINVAL)) | ||||
|             res = AVERROR_INVALIDDATA; | ||||
|         if (res != AVERROR(EAGAIN)) | ||||
|         if (res != AVERROR(EAGAIN)) { | ||||
|             dav1d_data_unref(data); | ||||
|             return res; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     res = dav1d_get_picture(dav1d->c, p); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 James Almer
					James Almer