summaryrefslogtreecommitdiff
path: root/libavformat/4xm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/4xm.c')
-rw-r--r--libavformat/4xm.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 70f0def3ed..2f2f6a6afc 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -108,16 +108,16 @@ static int parse_vtrk(AVFormatContext *s,
fourxm->video_stream_index = st->index;
- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = AV_CODEC_ID_4XM;
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = AV_CODEC_ID_4XM;
- st->codec->extradata = av_mallocz(4 + AV_INPUT_BUFFER_PADDING_SIZE);
- if (!st->codec->extradata)
+ st->codecpar->extradata = av_mallocz(4 + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!st->codecpar->extradata)
return AVERROR(ENOMEM);
- st->codec->extradata_size = 4;
- AV_WL32(st->codec->extradata, AV_RL32(buf + 16));
- st->codec->width = AV_RL32(buf + 36);
- st->codec->height = AV_RL32(buf + 40);
+ st->codecpar->extradata_size = 4;
+ AV_WL32(st->codecpar->extradata, AV_RL32(buf + 16));
+ st->codecpar->width = AV_RL32(buf + 36);
+ st->codecpar->height = AV_RL32(buf + 40);
return 0;
}
@@ -173,23 +173,23 @@ static int parse_strk(AVFormatContext *s,
fourxm->tracks[track].stream_index = st->index;
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_tag = 0;
- st->codec->channels = fourxm->tracks[track].channels;
- st->codec->sample_rate = fourxm->tracks[track].sample_rate;
- st->codec->bits_per_coded_sample = fourxm->tracks[track].bits;
- st->codec->bit_rate = st->codec->channels *
- st->codec->sample_rate *
- st->codec->bits_per_coded_sample;
- st->codec->block_align = st->codec->channels *
- st->codec->bits_per_coded_sample;
+ st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codecpar->codec_tag = 0;
+ st->codecpar->channels = fourxm->tracks[track].channels;
+ st->codecpar->sample_rate = fourxm->tracks[track].sample_rate;
+ st->codecpar->bits_per_coded_sample = fourxm->tracks[track].bits;
+ st->codecpar->bit_rate = st->codecpar->channels *
+ st->codecpar->sample_rate *
+ st->codecpar->bits_per_coded_sample;
+ st->codecpar->block_align = st->codecpar->channels *
+ st->codecpar->bits_per_coded_sample;
if (fourxm->tracks[track].adpcm){
- st->codec->codec_id = AV_CODEC_ID_ADPCM_4XM;
- } else if (st->codec->bits_per_coded_sample == 8) {
- st->codec->codec_id = AV_CODEC_ID_PCM_U8;
+ st->codecpar->codec_id = AV_CODEC_ID_ADPCM_4XM;
+ } else if (st->codecpar->bits_per_coded_sample == 8) {
+ st->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
} else
- st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
+ st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE;
return 0;
}