summaryrefslogtreecommitdiff
path: root/libavformat/tta.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/tta.c')
-rw-r--r--libavformat/tta.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index f5304f31ed..be22527eab 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -106,25 +106,25 @@ static int tta_read_header(AVFormatContext *s)
}
avio_skip(s->pb, 4); // seektable crc
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = AV_CODEC_ID_TTA;
- st->codec->channels = channels;
- st->codec->sample_rate = samplerate;
- st->codec->bits_per_coded_sample = bps;
-
- st->codec->extradata_size = avio_tell(s->pb) - start_offset;
- if(st->codec->extradata_size+AV_INPUT_BUFFER_PADDING_SIZE <= (unsigned)st->codec->extradata_size){
+ st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codecpar->codec_id = AV_CODEC_ID_TTA;
+ st->codecpar->channels = channels;
+ st->codecpar->sample_rate = samplerate;
+ st->codecpar->bits_per_coded_sample = bps;
+
+ st->codecpar->extradata_size = avio_tell(s->pb) - start_offset;
+ if (st->codecpar->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE <= (unsigned)st->codecpar->extradata_size) {
//this check is redundant as avio_read should fail
av_log(s, AV_LOG_ERROR, "extradata_size too large\n");
return -1;
}
- st->codec->extradata = av_mallocz(st->codec->extradata_size+AV_INPUT_BUFFER_PADDING_SIZE);
- if (!st->codec->extradata) {
- st->codec->extradata_size = 0;
+ st->codecpar->extradata = av_mallocz(st->codecpar->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!st->codecpar->extradata) {
+ st->codecpar->extradata_size = 0;
return AVERROR(ENOMEM);
}
avio_seek(s->pb, start_offset, SEEK_SET);
- avio_read(s->pb, st->codec->extradata, st->codec->extradata_size);
+ avio_read(s->pb, st->codecpar->extradata, st->codecpar->extradata_size);
return 0;
}