summaryrefslogtreecommitdiff
path: root/libavformat/thp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/thp.c')
-rw-r--r--libavformat/thp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/thp.c b/libavformat/thp.c
index 27d7ab433b..c9ec5c131d 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -101,12 +101,12 @@ static int thp_read_header(AVFormatContext *s)
/* The denominator and numerator are switched because 1/fps
is required. */
avpriv_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = AV_CODEC_ID_THP;
- st->codec->codec_tag = 0; /* no fourcc */
- st->codec->width = avio_rb32(pb);
- st->codec->height = avio_rb32(pb);
- st->codec->sample_rate = av_q2d(thp->fps);
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = AV_CODEC_ID_THP;
+ st->codecpar->codec_tag = 0; /* no fourcc */
+ st->codecpar->width = avio_rb32(pb);
+ st->codecpar->height = avio_rb32(pb);
+ st->codecpar->sample_rate = av_q2d(thp->fps);
thp->vst = st;
thp->video_stream_index = st->index;
@@ -121,14 +121,14 @@ static int thp_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = AV_CODEC_ID_ADPCM_THP;
- st->codec->codec_tag = 0; /* no fourcc */
- st->codec->channels = avio_rb32(pb); /* numChannels. */
- st->codec->sample_rate = avio_rb32(pb); /* Frequency. */
+ st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codecpar->codec_id = AV_CODEC_ID_ADPCM_THP;
+ st->codecpar->codec_tag = 0; /* no fourcc */
+ st->codecpar->channels = avio_rb32(pb); /* numChannels. */
+ st->codecpar->sample_rate = avio_rb32(pb); /* Frequency. */
st->duration = avio_rb32(pb);
- avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
thp->audio_stream_index = st->index;
thp->has_audio = 1;