Revision 01f4895c libavformat/idcin.c

View differences:

libavformat/idcin.c
156 156
        return AVERROR_NOMEM;
157 157
    av_set_pts_info(st, 33, 1, 90000);
158 158
    idcin->video_stream_index = st->index;
159
    st->codec.codec_type = CODEC_TYPE_VIDEO;
160
    st->codec.codec_id = CODEC_ID_IDCIN;
161
    st->codec.codec_tag = 0;  /* no fourcc */
162
    st->codec.width = width;
163
    st->codec.height = height;
159
    st->codec->codec_type = CODEC_TYPE_VIDEO;
160
    st->codec->codec_id = CODEC_ID_IDCIN;
161
    st->codec->codec_tag = 0;  /* no fourcc */
162
    st->codec->width = width;
163
    st->codec->height = height;
164 164

  
165 165
    /* load up the Huffman tables into extradata */
166
    st->codec.extradata_size = HUFFMAN_TABLE_SIZE;
167
    st->codec.extradata = av_malloc(HUFFMAN_TABLE_SIZE);
168
    if (get_buffer(pb, st->codec.extradata, HUFFMAN_TABLE_SIZE) !=
166
    st->codec->extradata_size = HUFFMAN_TABLE_SIZE;
167
    st->codec->extradata = av_malloc(HUFFMAN_TABLE_SIZE);
168
    if (get_buffer(pb, st->codec->extradata, HUFFMAN_TABLE_SIZE) !=
169 169
        HUFFMAN_TABLE_SIZE)
170 170
        return AVERROR_IO;
171 171
    /* save a reference in order to transport the palette */
172
    st->codec.palctrl = &idcin->palctrl;
172
    st->codec->palctrl = &idcin->palctrl;
173 173

  
174 174
    /* if sample rate is 0, assume no audio */
175 175
    if (sample_rate) {
......
179 179
            return AVERROR_NOMEM;
180 180
        av_set_pts_info(st, 33, 1, 90000);
181 181
        idcin->audio_stream_index = st->index;
182
        st->codec.codec_type = CODEC_TYPE_AUDIO;
183
        st->codec.codec_tag = 1;
184
        st->codec.channels = channels;
185
        st->codec.sample_rate = sample_rate;
186
        st->codec.bits_per_sample = bytes_per_sample * 8;
187
        st->codec.bit_rate = sample_rate * bytes_per_sample * 8 * channels;
188
        st->codec.block_align = bytes_per_sample * channels;
182
        st->codec->codec_type = CODEC_TYPE_AUDIO;
183
        st->codec->codec_tag = 1;
184
        st->codec->channels = channels;
185
        st->codec->sample_rate = sample_rate;
186
        st->codec->bits_per_sample = bytes_per_sample * 8;
187
        st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels;
188
        st->codec->block_align = bytes_per_sample * channels;
189 189
        if (bytes_per_sample == 1)
190
            st->codec.codec_id = CODEC_ID_PCM_U8;
190
            st->codec->codec_id = CODEC_ID_PCM_U8;
191 191
        else
192
            st->codec.codec_id = CODEC_ID_PCM_S16LE;
192
            st->codec->codec_id = CODEC_ID_PCM_S16LE;
193 193

  
194 194
        if (sample_rate % 14 != 0) {
195 195
            idcin->audio_chunk_size1 = (sample_rate / 14) *

Also available in: Unified diff