diff options
Diffstat (limited to 'libavformat/pmpdec.c')
-rw-r--r-- | libavformat/pmpdec.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c index 8ae147f391..e2709bbbe3 100644 --- a/libavformat/pmpdec.c +++ b/libavformat/pmpdec.c @@ -52,22 +52,22 @@ static int pmp_header(AVFormatContext *s) AVStream *vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); - vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; + vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; avio_skip(pb, 8); switch (avio_rl32(pb)) { case 0: - vst->codec->codec_id = AV_CODEC_ID_MPEG4; + vst->codecpar->codec_id = AV_CODEC_ID_MPEG4; break; case 1: - vst->codec->codec_id = AV_CODEC_ID_H264; + vst->codecpar->codec_id = AV_CODEC_ID_H264; break; default: av_log(s, AV_LOG_ERROR, "Unsupported video format\n"); break; } index_cnt = avio_rl32(pb); - vst->codec->width = avio_rl32(pb); - vst->codec->height = avio_rl32(pb); + vst->codecpar->width = avio_rl32(pb); + vst->codecpar->height = avio_rl32(pb); tb_num = avio_rl32(pb); tb_den = avio_rl32(pb); @@ -95,10 +95,10 @@ static int pmp_header(AVFormatContext *s) AVStream *ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); - ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; - ast->codec->codec_id = audio_codec_id; - ast->codec->channels = channels; - ast->codec->sample_rate = srate; + ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; + ast->codecpar->codec_id = audio_codec_id; + ast->codecpar->channels = channels; + ast->codecpar->sample_rate = srate; avpriv_set_pts_info(ast, 32, 1, srate); } pos = avio_tell(pb) + 4 * index_cnt; |