You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avfilter/aresample: Check for memory alloc failure for out sample rates
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
		| @@ -103,6 +103,11 @@ static int query_formats(AVFilterContext *ctx) | |||||||
|     } else { |     } else { | ||||||
|         out_samplerates = ff_all_samplerates(); |         out_samplerates = ff_all_samplerates(); | ||||||
|     } |     } | ||||||
|  |     if (!out_samplerates) { | ||||||
|  |         av_log(ctx, AV_LOG_ERROR, "Cannot allocate output samplerates.\n"); | ||||||
|  |         return AVERROR(ENOMEM); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     ff_formats_ref(out_samplerates, &outlink->in_samplerates); |     ff_formats_ref(out_samplerates, &outlink->in_samplerates); | ||||||
|  |  | ||||||
|     if(out_format != AV_SAMPLE_FMT_NONE) { |     if(out_format != AV_SAMPLE_FMT_NONE) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user