// for the text in a few cases; samples needed.)
error |= read_line(pb, line, sizeof(line)); // ARMovie
error |= read_line(pb, line, sizeof(line)); // movie name
- av_metadata_set(&s->metadata, "title" , line);
+ av_metadata_set2(&s->metadata, "title" , line, 0);
error |= read_line(pb, line, sizeof(line)); // date/copyright
- av_metadata_set(&s->metadata, "copyright", line);
+ av_metadata_set2(&s->metadata, "copyright", line, 0);
error |= read_line(pb, line, sizeof(line)); // author and other
- av_metadata_set(&s->metadata, "author" , line);
+ av_metadata_set2(&s->metadata, "author" , line, 0);
// video headers
vst = av_new_stream(s, 0);
if (!vst)
return AVERROR(ENOMEM);
- vst->codec->codec_type = CODEC_TYPE_VIDEO;
+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_tag = read_line_and_int(pb, &error); // video format
vst->codec->width = read_line_and_int(pb, &error); // video width
vst->codec->height = read_line_and_int(pb, &error); // video height
ast = av_new_stream(s, 0);
if (!ast)
return AVERROR(ENOMEM);
- ast->codec->codec_type = CODEC_TYPE_AUDIO;
+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_tag = audio_format;
ast->codec->sample_rate = read_line_and_int(pb, &error); // audio bitrate
ast->codec->channels = read_line_and_int(pb, &error); // number of audio channels
if (url_fseek(pb, index_entry->pos, SEEK_SET) < 0)
return AVERROR(EIO);
- if (stream->codec->codec_type == CODEC_TYPE_VIDEO &&
+ if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
stream->codec->codec_tag == 124) {
// We have to split Escape 124 frames because there are
// multiple frames per chunk in Escape 124 samples.
return AVERROR(EIO);
}
- if (stream->codec->codec_type == CODEC_TYPE_VIDEO) {
+ if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
// frames_per_chunk should always be one here; the header
// parsing will warn if it isn't.
pkt->duration = rpl->frames_per_chunk;
// None of the Escape formats have keyframes, and the ADPCM
// format used doesn't have keyframes.
if (rpl->chunk_number == 0 && rpl->frame_in_part == 0)
- pkt->flags |= PKT_FLAG_KEY;
+ pkt->flags |= AV_PKT_FLAG_KEY;
return ret;
}