diff --git a/libswresample/swresample.c b/libswresample/swresample.c index f2e66005eb..74c96dce60 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -223,6 +223,8 @@ av_cold int swr_init(struct SwrContext *s){ }else if( av_get_planar_sample_fmt(s-> in_sample_fmt) == AV_SAMPLE_FMT_S32P && av_get_planar_sample_fmt(s->out_sample_fmt) == AV_SAMPLE_FMT_S32P && !s->rematrix + && s->out_sample_rate == s->in_sample_rate + && !(s->flags & SWR_FLAG_RESAMPLE) && s->engine != SWR_ENGINE_SOXR){ s->int_sample_fmt= AV_SAMPLE_FMT_S32P; }else if(av_get_bytes_per_sample(s->in_sample_fmt) <= 4){