Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-03-22 16:11:03 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-03-22 16:20:12 +0300
commit914ad90eddce785592dd7fbe4c1b513c0025a383 (patch)
treed641fd6100d9df60ac0b71af3903a81d4ef20a76 /libswresample/swresample.c
parentef888de1c1d2581d45c1917d8f9081b35ea07a72 (diff)
swresample/swresample: Remove "less than" comparissions of enums
Found-by: wm4 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r--libswresample/swresample.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 8e238998e9..e02ec81db6 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -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;