Revision 90a29294

View differences:

libavformat/oggparsecelt.c
61 61
        overlap          = AV_RL32(p + 48);
62 62
        bytes_per_packet = AV_RL32(p + 52); /* unused */
63 63
        extra_headers    = AV_RL32(p + 56);
64
        av_free(os->private);
65
        av_free(st->codec->extradata);
66 64
        st->codec->codec_type     = AVMEDIA_TYPE_AUDIO;
67 65
        st->codec->codec_id       = CODEC_ID_CELT;
68 66
        st->codec->sample_rate    = sample_rate;
69 67
        st->codec->channels       = nb_channels;
70 68
        st->codec->frame_size     = frame_size;
71 69
        st->codec->sample_fmt     = AV_SAMPLE_FMT_S16;
72
        st->codec->extradata      = extradata;
73
        st->codec->extradata_size = 2 * sizeof(uint32_t);
74 70
        av_set_pts_info(st, 64, 1, sample_rate);
75 71
        priv->extra_headers_left  = 1 + extra_headers;
72
        av_free(os->private);
76 73
        os->private = priv;
77 74
        AV_WL32(extradata + 0, overlap);
78 75
        AV_WL32(extradata + 4, version);
76
        av_free(st->codec->extradata);
77
        st->codec->extradata = extradata;
78
        st->codec->extradata_size = 2 * sizeof(uint32_t);
79 79
        return 1;
80 80

  
81 81
    } else if(priv && priv->extra_headers_left) {

Also available in: Unified diff