]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/resample.c
resample: fix set but unused variable (lfe) warning.
[ffmpeg] / libavcodec / resample.c
index 82c09fc5024c7427c7042604e533ae84c3324375..77f73cbba8dffd7a0d7d0cf72c1259df19f0b023 100644 (file)
@@ -121,11 +121,11 @@ static void surround_to_stereo(short **output, short *input, int channels, int s
     short l, r;
 
     for (i = 0; i < samples; i++) {
-        int fl,fr,c,rl,rr,lfe;
+        int fl,fr,c,rl,rr;
         fl = input[0];
         fr = input[1];
         c = input[2];
-        lfe = input[3];
+        // lfe = input[3];
         rl = input[4];
         rr = input[5];
 
@@ -239,8 +239,8 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
 
     s->sample_fmt[0]  = sample_fmt_in;
     s->sample_fmt[1]  = sample_fmt_out;
-    s->sample_size[0] = av_get_bits_per_sample_fmt(s->sample_fmt[0]) >> 3;
-    s->sample_size[1] = av_get_bits_per_sample_fmt(s->sample_fmt[1]) >> 3;
+    s->sample_size[0] = av_get_bytes_per_sample(s->sample_fmt[0]);
+    s->sample_size[1] = av_get_bytes_per_sample(s->sample_fmt[1]);
 
     if (s->sample_fmt[0] != AV_SAMPLE_FMT_S16) {
         if (!(s->convert_ctx[0] = av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1,