Mercurial > libavformat.hg
diff idcin.c @ 820:feca73904e67 libavformat
changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
author | michael |
---|---|
date | Sun, 17 Jul 2005 22:24:36 +0000 |
parents | c5077fdab490 |
children | da1d5db0ce5c |
line wrap: on
line diff
--- a/idcin.c Sun Jul 17 00:28:12 2005 +0000 +++ b/idcin.c Sun Jul 17 22:24:36 2005 +0000 @@ -156,20 +156,20 @@ return AVERROR_NOMEM; av_set_pts_info(st, 33, 1, 90000); idcin->video_stream_index = st->index; - st->codec.codec_type = CODEC_TYPE_VIDEO; - st->codec.codec_id = CODEC_ID_IDCIN; - st->codec.codec_tag = 0; /* no fourcc */ - st->codec.width = width; - st->codec.height = height; + st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_id = CODEC_ID_IDCIN; + st->codec->codec_tag = 0; /* no fourcc */ + st->codec->width = width; + st->codec->height = height; /* load up the Huffman tables into extradata */ - st->codec.extradata_size = HUFFMAN_TABLE_SIZE; - st->codec.extradata = av_malloc(HUFFMAN_TABLE_SIZE); - if (get_buffer(pb, st->codec.extradata, HUFFMAN_TABLE_SIZE) != + st->codec->extradata_size = HUFFMAN_TABLE_SIZE; + st->codec->extradata = av_malloc(HUFFMAN_TABLE_SIZE); + if (get_buffer(pb, st->codec->extradata, HUFFMAN_TABLE_SIZE) != HUFFMAN_TABLE_SIZE) return AVERROR_IO; /* save a reference in order to transport the palette */ - st->codec.palctrl = &idcin->palctrl; + st->codec->palctrl = &idcin->palctrl; /* if sample rate is 0, assume no audio */ if (sample_rate) { @@ -179,17 +179,17 @@ return AVERROR_NOMEM; av_set_pts_info(st, 33, 1, 90000); idcin->audio_stream_index = st->index; - st->codec.codec_type = CODEC_TYPE_AUDIO; - st->codec.codec_tag = 1; - st->codec.channels = channels; - st->codec.sample_rate = sample_rate; - st->codec.bits_per_sample = bytes_per_sample * 8; - st->codec.bit_rate = sample_rate * bytes_per_sample * 8 * channels; - st->codec.block_align = bytes_per_sample * channels; + st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_tag = 1; + st->codec->channels = channels; + st->codec->sample_rate = sample_rate; + st->codec->bits_per_sample = bytes_per_sample * 8; + st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels; + st->codec->block_align = bytes_per_sample * channels; if (bytes_per_sample == 1) - st->codec.codec_id = CODEC_ID_PCM_U8; + st->codec->codec_id = CODEC_ID_PCM_U8; else - st->codec.codec_id = CODEC_ID_PCM_S16LE; + st->codec->codec_id = CODEC_ID_PCM_S16LE; if (sample_rate % 14 != 0) { idcin->audio_chunk_size1 = (sample_rate / 14) *