Revision bde96717

View differences:

libavcodec/dca.c
1626 1626
    int lfe_samples;
1627 1627
    int num_core_channels = 0;
1628 1628
    int i;
1629
    /* ffdshow custom code */
1630
#if CONFIG_AUDIO_FLOAT
1631
    float *samples = data;
1632
#else
1629
    float *samples_flt = data;
1633 1630
    int16_t *samples = data;
1634
#endif
1635 1631
    DCAContext *s = avctx->priv_data;
1636 1632
    int channels;
1637 1633
    int core_ss_end;
......
1840 1836
        }
1841 1837

  
1842 1838
        /* interleave samples */
1843
#if CONFIG_AUDIO_FLOAT
1844
        /* ffdshow custom code */
1845
        float_interleave(samples, s->samples_chanptr, 256, channels);
1846
#else
1847
        s->fmt_conv.float_to_int16_interleave(samples, s->samples_chanptr, 256, channels);
1848
#endif
1849
        samples += 256 * channels;
1839
        if (avctx->sample_fmt == AV_SAMPLE_FMT_FLT) {
1840
            float_interleave(samples_flt, s->samples_chanptr, 256, channels);
1841
            samples_flt += 256 * channels;
1842
        } else {
1843
            s->fmt_conv.float_to_int16_interleave(samples, s->samples_chanptr, 256, channels);
1844
            samples += 256 * channels;
1845
        }
1850 1846
    }
1851 1847

  
1852 1848
    /* update lfe history */
......
1882 1878

  
1883 1879
    for (i = 0; i < DCA_PRIM_CHANNELS_MAX+1; i++)
1884 1880
        s->samples_chanptr[i] = s->samples + i * 256;
1885
    /* ffdshow custom code */
1886
#if CONFIG_AUDIO_FLOAT
1887
    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
1888
#else
1889
    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
1890
#endif
1881
    avctx->sample_fmt = avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT ?
1882
                        AV_SAMPLE_FMT_FLT : AV_SAMPLE_FMT_S16;
1891 1883

  
1892 1884
    s->scale_bias = 1.0;
1893 1885

  

Also available in: Unified diff