Revision 57406d8e

View differences:

libavformat/riff.c
171 171
    { CODEC_ID_PCM_S24LE,       0x0001 },
172 172
    { CODEC_ID_PCM_S32LE,       0x0001 },
173 173
    { CODEC_ID_ADPCM_MS,        0x0002 },
174
    { CODEC_ID_PCM_F32LE,       0x0003 },
175
    { CODEC_ID_PCM_F64LE,       0x0003 }, /* must come after f32le in this list */
174 176
    { CODEC_ID_PCM_ALAW,        0x0006 },
175 177
    { CODEC_ID_PCM_MULAW,       0x0007 },
176 178
    { CODEC_ID_WMAVOICE,        0x000A },
......
252 254
        bps = 4;
253 255
    } else if (enc->codec_id == CODEC_ID_PCM_S24LE) {
254 256
        bps = 24;
255
    } else if (enc->codec_id == CODEC_ID_PCM_S32LE) {
257
    } else if (enc->codec_id == CODEC_ID_PCM_S32LE || enc->codec_id == CODEC_ID_PCM_F32LE) {
256 258
        bps = 32;
259
    } else if (enc->codec_id == CODEC_ID_PCM_F64LE) {
260
        bps = 64;
257 261
    } else {
258 262
        bps = 16;
259 263
    }
......
273 277
    if (enc->codec_id == CODEC_ID_PCM_U8 ||
274 278
        enc->codec_id == CODEC_ID_PCM_S24LE ||
275 279
        enc->codec_id == CODEC_ID_PCM_S32LE ||
280
        enc->codec_id == CODEC_ID_PCM_F32LE ||
281
        enc->codec_id == CODEC_ID_PCM_F64LE ||
276 282
        enc->codec_id == CODEC_ID_PCM_S16LE) {
277 283
        bytespersec = enc->sample_rate * blkalign;
278 284
    } else {
......
410 416
        id = CODEC_ID_PCM_S24LE;
411 417
    if (id == CODEC_ID_PCM_S16LE && bps == 32)
412 418
        id = CODEC_ID_PCM_S32LE;
419
    if (id == CODEC_ID_PCM_F32LE && bps == 64)
420
        id = CODEC_ID_PCM_F64LE;
413 421
    if (id == CODEC_ID_ADPCM_IMA_WAV && bps == 8)
414 422
        id = CODEC_ID_PCM_ZORK;
415 423
    return id;

Also available in: Unified diff