AVS_GAME_DATA = 0x04,
} AvsBlockType;
-static int avs_probe(AVProbeData * p)
+static int avs_probe(const AVProbeData * p)
{
const uint8_t *d;
pkt->data[palette_size + 3] = (size >> 8) & 0xFF;
ret = avio_read(s->pb, pkt->data + palette_size + 4, size - 4) + 4;
if (ret < size) {
- av_packet_unref(pkt);
return AVERROR(EIO);
}
static int avs_read_audio_packet(AVFormatContext * s, AVPacket * pkt)
{
AvsFormat *avs = s->priv_data;
- int ret, size;
+ int ret;
+ int64_t size;
size = avio_tell(s->pb);
ret = ff_voc_get_packet(s, pkt, avs->st_audio, avs->remaining_audio_size);
}
}
-static int avs_read_close(AVFormatContext * s)
-{
- return 0;
-}
-
AVInputFormat ff_avs_demuxer = {
.name = "avs",
.long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Creature Shock"),
.read_probe = avs_probe,
.read_header = avs_read_header,
.read_packet = avs_read_packet,
- .read_close = avs_read_close,
};