if (pos + 12 > len)
return AVERROR_INVALIDDATA;
- skip_bits(&gb, 2); // has non-I frames:1, is sparse:1
+ skip_bits(&gb, 2); // has non-I-frames:1, is sparse:1
is_start = get_bits1(&gb);
is_finish = get_bits1(&gb);
if (!is_start || !is_finish) {
avio_seek(&pb, pos + 4, SEEK_SET);
tag = avio_rl32(&pb);
- if ((st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
+ if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
tag != MKTAG('v','i','d','e')) ||
- (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
+ (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
tag != MKTAG('s','o','u','n')))
return AVERROR_INVALIDDATA;
avpriv_set_pts_info(st, 32, 1, avio_rb32(&pb));
av_freep(&qt->pkt.data);
qt->pkt.data = av_realloc(NULL, qt->remaining * qt->bytes_per_frame);
if (!qt->pkt.data) {
- av_free_packet(pkt);
+ av_packet_unref(pkt);
return AVERROR(ENOMEM);
}
qt->pkt.size = qt->remaining * qt->bytes_per_frame;