*/
/**
- * @file libavformat/xa.c
+ * @file
* Maxis XA File Demuxer
* by Robert Marston (rmarston@gmail.com)
* for more information on the XA audio format see
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = CODEC_TYPE_AUDIO;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_ADPCM_EA_MAXIS_XA;
url_fskip(pb, 4); /* Skip the XA ID */
xa->out_size = get_le32(pb);
packet_size = 15*st->codec->channels;
ret = av_get_packet(pb, pkt, packet_size);
- if(ret != packet_size)
- return AVERROR(EIO);
+ if(ret < 0)
+ return ret;
pkt->stream_index = st->index;
xa->sent_bytes += packet_size;