You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avutil/opt: allow max=min=0 for pixel formats
This is neccessary for maintaining ABI compatibility with FFmpeg 2.1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -327,6 +327,12 @@ static int set_string_fmt(void *obj, const AVOption *o, const char *val, uint8_t | ||||
|     min = FFMAX(o->min, -1); | ||||
|     max = FFMIN(o->max, fmt_nb-1); | ||||
|  | ||||
|     // hack for compatibility with old ffmpeg | ||||
|     if(min == 0 && max == 0) { | ||||
|         min = -1; | ||||
|         max = fmt_nb-1; | ||||
|     } | ||||
|  | ||||
|     if (fmt < min || fmt > max) { | ||||
|         av_log(obj, AV_LOG_ERROR, | ||||
|                "Value %d for parameter '%s' out of %s format range [%d - %d]\n", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user