From edbde5222688c18eecd7a589779aa8696b64a6ab Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 28 Apr 2012 11:19:22 +0200 Subject: swr: change sample format representation so as to maintain the planer/packed distinction. Signed-off-by: Michael Niedermayer --- libswresample/dither.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libswresample/dither.c') diff --git a/libswresample/dither.c b/libswresample/dither.c index a340733610..79113f4c23 100644 --- a/libswresample/dither.c +++ b/libswresample/dither.c @@ -27,6 +27,9 @@ void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSa double *tmp = av_malloc((len + TMP_EXTRA) * sizeof(double)); int i; + out_fmt = av_get_packed_sample_fmt(out_fmt); + in_fmt = av_get_packed_sample_fmt( in_fmt); + if(in_fmt == AV_SAMPLE_FMT_FLT || in_fmt == AV_SAMPLE_FMT_DBL){ if(out_fmt == AV_SAMPLE_FMT_S32) scale = 1.0/(1L<<31); if(out_fmt == AV_SAMPLE_FMT_S16) scale = 1.0/(1L<<15); -- cgit v1.2.3