Mercurial > libavformat.hg
diff segafilm.c @ 2274:b21c2af60bc9 libavformat
Replace all occurrences of AVERROR_IO with AVERROR(EIO).
author | takis |
---|---|
date | Thu, 19 Jul 2007 15:23:32 +0000 |
parents | 7eb456c4ed8a |
children | d52c718e83f9 |
line wrap: on
line diff
--- a/segafilm.c Thu Jul 19 15:21:30 2007 +0000 +++ b/segafilm.c Thu Jul 19 15:23:32 2007 +0000 @@ -89,7 +89,7 @@ /* load the main FILM header */ if (get_buffer(pb, scratch, 16) != 16) - return AVERROR_IO; + return AVERROR(EIO); data_offset = AV_RB32(&scratch[4]); film->version = AV_RB32(&scratch[8]); @@ -97,7 +97,7 @@ if (film->version == 0) { /* special case for Lemmings .film files; 20-byte header */ if (get_buffer(pb, scratch, 20) != 20) - return AVERROR_IO; + return AVERROR(EIO); /* make some assumptions about the audio parameters */ film->audio_type = CODEC_ID_PCM_S8; film->audio_samplerate = 22050; @@ -106,7 +106,7 @@ } else { /* normal Saturn .cpk files; 32-byte header */ if (get_buffer(pb, scratch, 32) != 32) - return AVERROR_IO; + return AVERROR(EIO); film->audio_samplerate = AV_RB16(&scratch[24]);; film->audio_channels = scratch[21]; film->audio_bits = scratch[22]; @@ -158,7 +158,7 @@ /* load the sample table */ if (get_buffer(pb, scratch, 16) != 16) - return AVERROR_IO; + return AVERROR(EIO); if (AV_RB32(&scratch[0]) != STAB_TAG) return AVERROR_INVALIDDATA; film->base_clock = AV_RB32(&scratch[8]); @@ -175,7 +175,7 @@ /* load the next sample record and transfer it to an internal struct */ if (get_buffer(pb, scratch, 16) != 16) { av_free(film->sample_table); - return AVERROR_IO; + return AVERROR(EIO); } film->sample_table[i].sample_offset = data_offset + AV_RB32(&scratch[0]); @@ -211,7 +211,7 @@ int left, right; if (film->current_sample >= film->sample_count) - return AVERROR_IO; + return AVERROR(EIO); sample = &film->sample_table[film->current_sample]; @@ -242,7 +242,7 @@ pkt->pos= url_ftell(pb); ret = get_buffer(pb, film->stereo_buffer, sample->sample_size); if (ret != sample->sample_size) - ret = AVERROR_IO; + ret = AVERROR(EIO); left = 0; right = sample->sample_size / 2; @@ -260,7 +260,7 @@ } else { ret= av_get_packet(pb, pkt, sample->sample_size); if (ret != sample->sample_size) - ret = AVERROR_IO; + ret = AVERROR(EIO); } pkt->stream_index = sample->stream;