Revision c4f8d5d9 libavformat/wav.c

View differences:

libavformat/wav.c
107 107
        put_le16(pb, 2); /* wav_extra_size */
108 108
        hdrsize += 2;
109 109
        put_le16(pb, ((enc->block_align - 4 * enc->channels) / (4 * enc->channels)) * 8 + 1); /* wSamplesPerBlock */
110
    } else {
110
    } else if(enc->extradata_size){
111 111
        put_le16(pb, enc->extradata_size);
112 112
        put_buffer(pb, enc->extradata, enc->extradata_size);
113 113
        hdrsize += enc->extradata_size;
......
115 115
            hdrsize++;
116 116
            put_byte(pb, 0);
117 117
        }
118
    } else {
119
        hdrsize -= 2;
118 120
    }
119 121

  
120 122
    return hdrsize;

Also available in: Unified diff