codec_id = AV_CODEC_ID_DTS;
} else if (startcode >= 0xa0 && startcode <= 0xaf) {
type = AVMEDIA_TYPE_AUDIO;
- if (lpcm_header_len == 6) {
+ if (lpcm_header_len == 6 || startcode == 0xa1) {
codec_id = AV_CODEC_ID_MLP;
} else {
codec_id = AV_CODEC_ID_PCM_DVD;
if (!st)
goto skip;
st->id = startcode;
- st->codec->codec_type = type;
- st->codec->codec_id = codec_id;
- if ( st->codec->codec_id == AV_CODEC_ID_PCM_MULAW
- || st->codec->codec_id == AV_CODEC_ID_PCM_ALAW) {
- st->codec->channels = 1;
- st->codec->channel_layout = AV_CH_LAYOUT_MONO;
- st->codec->sample_rate = 8000;
+ st->codecpar->codec_type = type;
+ st->codecpar->codec_id = codec_id;
+ if ( st->codecpar->codec_id == AV_CODEC_ID_PCM_MULAW
+ || st->codecpar->codec_id == AV_CODEC_ID_PCM_ALAW) {
+ st->codecpar->channels = 1;
+ st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
+ st->codecpar->sample_rate = 8000;
}
st->request_probe = request_probe;
st->need_parsing = AVSTREAM_PARSE_FULL;
if (st->discard >= AVDISCARD_ALL)
goto skip;
if (startcode >= 0xa0 && startcode <= 0xaf) {
- if (st->codec->codec_id == AV_CODEC_ID_MLP) {
+ if (st->codecpar->codec_id == AV_CODEC_ID_MLP) {
if (len < 6)
goto skip;
avio_skip(s->pb, 6);
goto end;
}
- if ((ret = ff_copy_whitelists(vobsub->sub_ctx, s)) < 0)
+ if ((ret = ff_copy_whiteblacklists(vobsub->sub_ctx, s)) < 0)
goto end;
ret = avformat_open_input(&vobsub->sub_ctx, vobsub->sub_name, iformat, NULL);
goto end;
}
st->id = stream_id;
- st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = AV_CODEC_ID_DVD_SUBTITLE;
+ st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE;
+ st->codecpar->codec_id = AV_CODEC_ID_DVD_SUBTITLE;
avpriv_set_pts_info(st, 64, 1, 1000);
av_dict_set(&st->metadata, "language", id, 0);
if (alt[0])
av_bprint_finalize(&header, &header_str);
for (i = 0; i < s->nb_streams; i++) {
AVStream *sub_st = s->streams[i];
- sub_st->codec->extradata = av_strdup(header_str);
- sub_st->codec->extradata_size = header.len;
+ sub_st->codecpar->extradata = av_strdup(header_str);
+ sub_st->codecpar->extradata_size = header.len;
}
av_free(header_str);