]> git.sesse.net Git - ffmpeg/commitdiff
swr: fix silence buffer for planar U8
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 6 May 2012 22:05:19 +0000 (00:05 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 6 May 2012 22:05:19 +0000 (00:05 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/audioconvert.c

index 3143d697b77f436959d5d29f273e983eb05b2f27..c53135677bc948380a71ccca0a35f50f3242bd08 100644 (file)
@@ -142,7 +142,7 @@ AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt,
     ctx->channels = channels;
     ctx->conv_f   = f;
     ctx->ch_map   = ch_map;
-    if (in_fmt == AV_SAMPLE_FMT_U8)
+    if (in_fmt == AV_SAMPLE_FMT_U8 || in_fmt == AV_SAMPLE_FMT_U8P)
         memset(ctx->silence, 0x80, sizeof(ctx->silence));
 
     if(out_fmt == in_fmt && !ch_map) {