You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	swresample/swresample: Remove "less than" comparissions of enums
Found-by: wm4 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		| @@ -213,10 +213,10 @@ av_cold int swr_init(struct SwrContext *s){ | ||||
|                  s->rematrix_custom; | ||||
|  | ||||
|     if(s->int_sample_fmt == AV_SAMPLE_FMT_NONE){ | ||||
|         if(   av_get_planar_sample_fmt(s-> in_sample_fmt) <= AV_SAMPLE_FMT_S16P | ||||
|            && av_get_planar_sample_fmt(s->out_sample_fmt) <= AV_SAMPLE_FMT_S16P){ | ||||
|         if(   av_get_bytes_per_sample(s-> in_sample_fmt) <= 2 | ||||
|            && av_get_bytes_per_sample(s->out_sample_fmt) <= 2){ | ||||
|             s->int_sample_fmt= AV_SAMPLE_FMT_S16P; | ||||
|         }else if(   av_get_planar_sample_fmt(s-> in_sample_fmt) <= AV_SAMPLE_FMT_S16P | ||||
|         }else if(   av_get_bytes_per_sample(s-> in_sample_fmt) <= 2 | ||||
|            && !s->rematrix | ||||
|            && s->out_sample_rate==s->in_sample_rate | ||||
|            && !(s->flags & SWR_FLAG_RESAMPLE)){ | ||||
| @@ -226,7 +226,7 @@ av_cold int swr_init(struct SwrContext *s){ | ||||
|                  && !s->rematrix | ||||
|                  && s->engine != SWR_ENGINE_SOXR){ | ||||
|             s->int_sample_fmt= AV_SAMPLE_FMT_S32P; | ||||
|         }else if(av_get_planar_sample_fmt(s->in_sample_fmt) <= AV_SAMPLE_FMT_FLTP){ | ||||
|         }else if(av_get_bytes_per_sample(s->in_sample_fmt) <= 4){ | ||||
|             s->int_sample_fmt= AV_SAMPLE_FMT_FLTP; | ||||
|         }else{ | ||||
|             s->int_sample_fmt= AV_SAMPLE_FMT_DBLP; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user