summaryrefslogtreecommitdiff
path: root/libavformat/xmv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/xmv.c')
-rw-r--r--libavformat/xmv.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index b8e3191607..b2112b0e95 100644
--- a/libavformat/xmv.c
+++ b/libavformat/xmv.c
@@ -169,11 +169,11 @@ static int xmv_read_header(AVFormatContext *s)
avpriv_set_pts_info(vst, 32, 1, 1000);
- vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = AV_CODEC_ID_WMV2;
- vst->codec->codec_tag = MKBETAG('W', 'M', 'V', '2');
- vst->codec->width = avio_rl32(pb);
- vst->codec->height = avio_rl32(pb);
+ vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ vst->codecpar->codec_id = AV_CODEC_ID_WMV2;
+ vst->codecpar->codec_tag = MKBETAG('W', 'M', 'V', '2');
+ vst->codecpar->width = avio_rl32(pb);
+ vst->codecpar->height = avio_rl32(pb);
vst->duration = avio_rl32(pb);
@@ -240,14 +240,14 @@ static int xmv_read_header(AVFormatContext *s)
goto fail;
}
- ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = track->codec_id;
- ast->codec->codec_tag = track->compression;
- ast->codec->channels = track->channels;
- ast->codec->sample_rate = track->sample_rate;
- ast->codec->bits_per_coded_sample = track->bits_per_sample;
- ast->codec->bit_rate = track->bit_rate;
- ast->codec->block_align = 36 * track->channels;
+ ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ ast->codecpar->codec_id = track->codec_id;
+ ast->codecpar->codec_tag = track->compression;
+ ast->codecpar->channels = track->channels;
+ ast->codecpar->sample_rate = track->sample_rate;
+ ast->codecpar->bits_per_coded_sample = track->bits_per_sample;
+ ast->codecpar->bit_rate = track->bit_rate;
+ ast->codecpar->block_align = 36 * track->channels;
avpriv_set_pts_info(ast, 32, track->block_samples, track->sample_rate);
@@ -389,15 +389,15 @@ static int xmv_process_packet_header(AVFormatContext *s)
assert(xmv->video.stream_index < s->nb_streams);
- if (vst->codec->extradata_size < 4) {
- av_free(vst->codec->extradata);
+ if (vst->codecpar->extradata_size < 4) {
+ av_free(vst->codecpar->extradata);
- vst->codec->extradata =
+ vst->codecpar->extradata =
av_malloc(4 + AV_INPUT_BUFFER_PADDING_SIZE);
- vst->codec->extradata_size = 4;
+ vst->codecpar->extradata_size = 4;
}
- memcpy(vst->codec->extradata, xmv->video.extradata, 4);
+ memcpy(vst->codecpar->extradata, xmv->video.extradata, 4);
}
}
}