Revision 5798368b libav/wav.c

View differences:

libav/wav.c
21 21

  
22 22
CodecTag codec_wav_tags[] = {
23 23
    { CODEC_ID_MP2, 0x55 },
24
    { CODEC_ID_MP3LAME, 0x55 },
24 25
    { CODEC_ID_MP2, 0x50 },
25 26
    { CODEC_ID_AC3, 0x2000 },
26 27
    { CODEC_ID_PCM_S16LE, 0x01 },
......
45 46
        enc->codec_id == CODEC_ID_PCM_ALAW ||
46 47
        enc->codec_id == CODEC_ID_PCM_MULAW) {
47 48
        bps = 8;
48
    } else if (enc->codec_id == CODEC_ID_MP2) {
49
    } else if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3LAME) {
49 50
        bps = 0;
50 51
    } else {
51 52
        bps = 16;
52 53
    }
53 54
    
54
    if (enc->codec_id == CODEC_ID_MP2)
55
    if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3LAME)
55 56
        blkalign = 1;
56 57
    else
57 58
        blkalign = enc->channels*bps >> 3;
......
64 65
    put_le32(pb, bytespersec); /* bytes per second */
65 66
    put_le16(pb, blkalign); /* block align */
66 67
    put_le16(pb, bps); /* bits per sample */
67
    if (enc->codec_id == CODEC_ID_MP2) {
68
    if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3LAME) {
68 69
        put_le16(pb, 12); /* wav_extra_size */
69 70
        put_le16(pb, 1); /* wID */
70 71
        put_le32(pb, 2); /* fdwFlags */

Also available in: Unified diff