switch(chunk_tag){
case MKTAG('C','O','M','M'):
+ if (len < 12)
+ return AVERROR_INVALIDDATA;
+
avio_read(s->pb, comm_chunk, 12);
st->codecpar->channels = AV_RB32(comm_chunk ) + 1;
read_bitrate = AV_RB32(comm_chunk + 4);
int ret;
int size = (c->frame_bit_len - c->remaining_bits + 7)>>3;
- if (av_new_packet(pkt, size+2) < 0)
- return AVERROR(EIO);
+ if ((ret = av_new_packet(pkt, size + 2)) < 0)
+ return ret;
pkt->pos = avio_tell(s->pb);
pkt->stream_index = 0;
ret = avio_read(s->pb, pkt->data+2, size);
if (ret != size) {
- av_packet_unref(pkt);
return AVERROR(EIO);
}
return 0;
}
-AVInputFormat ff_vqf_demuxer = {
+const AVInputFormat ff_vqf_demuxer = {
.name = "vqf",
.long_name = NULL_IF_CONFIG_SMALL("Nippon Telegraph and Telephone Corporation (NTT) TwinVQ"),
.priv_data_size = sizeof(VqfContext),