*/
/**
- * @file iss.c
+ * @file
* Funcom ISS file demuxer
* @author Jaikrishnan Menon
* for more information on the .iss file format, visit:
st = av_new_stream(s, 0);
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_IMA_ISS;
st->codec->channels = stereo ? 2 : 1;
st->codec->sample_rate = 44100;
IssDemuxContext *iss = s->priv_data;
int ret = av_get_packet(s->pb, pkt, iss->packet_size);
- if(ret < 0)
- return ret;
+ if(ret != iss->packet_size)
+ return AVERROR(EIO);
pkt->stream_index = 0;
pkt->pts = url_ftell(s->pb) - iss->sample_start_pos;