Revision 01f4895c libavformat/wav.c

View differences:

libavformat/wav.c
199 199

  
200 200
    /* format header */
201 201
    fmt = start_tag(pb, "fmt ");
202
    if (put_wav_header(pb, &s->streams[0]->codec) < 0) {
202
    if (put_wav_header(pb, s->streams[0]->codec) < 0) {
203 203
        av_free(wav);
204 204
        return -1;
205 205
    }
206 206
    end_tag(pb, fmt);
207 207

  
208
    av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec.sample_rate);
208
    av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
209 209

  
210 210
    /* data header */
211 211
    wav->data = start_tag(pb, "data");
......
305 305
    if (!st)
306 306
        return AVERROR_NOMEM;
307 307

  
308
    get_wav_header(pb, &st->codec, size);
308
    get_wav_header(pb, st->codec, size);
309 309
    st->need_parsing = 1;
310 310

  
311
    av_set_pts_info(st, 64, 1, st->codec.sample_rate);
311
    av_set_pts_info(st, 64, 1, st->codec->sample_rate);
312 312

  
313 313
    size = find_tag(pb, MKTAG('d', 'a', 't', 'a'));
314 314
    if (size < 0)
......
329 329
    st = s->streams[0];
330 330

  
331 331
    size = MAX_SIZE;
332
    if (st->codec.block_align > 1) {
333
        if (size < st->codec.block_align)
334
            size = st->codec.block_align;
335
        size = (size / st->codec.block_align) * st->codec.block_align;
332
    if (st->codec->block_align > 1) {
333
        if (size < st->codec->block_align)
334
            size = st->codec->block_align;
335
        size = (size / st->codec->block_align) * st->codec->block_align;
336 336
    }
337 337
    if (av_new_packet(pkt, size))
338 338
        return AVERROR_IO;
......
358 358
    AVStream *st;
359 359

  
360 360
    st = s->streams[0];
361
    switch(st->codec.codec_id) {
361
    switch(st->codec->codec_id) {
362 362
    case CODEC_ID_MP2:
363 363
    case CODEC_ID_MP3:
364 364
    case CODEC_ID_AC3:

Also available in: Unified diff