You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	lavu/buffer: forward av_buffer_realloc() error code.
Fix CID 1457235.
This commit is contained in:
		| @@ -170,6 +170,7 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size) | ||||
| { | ||||
|     AVBufferRef *buf = *pbuf; | ||||
|     uint8_t *tmp; | ||||
|     int ret; | ||||
|  | ||||
|     if (!buf) { | ||||
|         /* allocate a new buffer with av_realloc(), so it will be reallocatable | ||||
| @@ -196,9 +197,9 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size) | ||||
|         /* cannot realloc, allocate a new reallocable buffer and copy data */ | ||||
|         AVBufferRef *new = NULL; | ||||
|  | ||||
|         av_buffer_realloc(&new, size); | ||||
|         if (!new) | ||||
|             return AVERROR(ENOMEM); | ||||
|         ret = av_buffer_realloc(&new, size); | ||||
|         if (ret < 0) | ||||
|             return ret; | ||||
|  | ||||
|         memcpy(new->data, buf->data, FFMIN(size, buf->size)); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user