Mercurial > libavformat.hg
comparison smacker.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 | 2ca025105808 |
comparison
equal
deleted
inserted
replaced
2273:7eb456c4ed8a | 2274:b21c2af60bc9 |
---|---|
197 } | 197 } |
198 ret = get_buffer(pb, st->codec->extradata + 16, st->codec->extradata_size - 16); | 198 ret = get_buffer(pb, st->codec->extradata + 16, st->codec->extradata_size - 16); |
199 if(ret != st->codec->extradata_size - 16){ | 199 if(ret != st->codec->extradata_size - 16){ |
200 av_free(smk->frm_size); | 200 av_free(smk->frm_size); |
201 av_free(smk->frm_flags); | 201 av_free(smk->frm_flags); |
202 return AVERROR_IO; | 202 return AVERROR(EIO); |
203 } | 203 } |
204 ((int32_t*)st->codec->extradata)[0] = le2me_32(smk->mmap_size); | 204 ((int32_t*)st->codec->extradata)[0] = le2me_32(smk->mmap_size); |
205 ((int32_t*)st->codec->extradata)[1] = le2me_32(smk->mclr_size); | 205 ((int32_t*)st->codec->extradata)[1] = le2me_32(smk->mclr_size); |
206 ((int32_t*)st->codec->extradata)[2] = le2me_32(smk->full_size); | 206 ((int32_t*)st->codec->extradata)[2] = le2me_32(smk->full_size); |
207 ((int32_t*)st->codec->extradata)[3] = le2me_32(smk->type_size); | 207 ((int32_t*)st->codec->extradata)[3] = le2me_32(smk->type_size); |
282 smk->curstream++; | 282 smk->curstream++; |
283 smk->bufs[smk->curstream] = av_realloc(smk->bufs[smk->curstream], size); | 283 smk->bufs[smk->curstream] = av_realloc(smk->bufs[smk->curstream], size); |
284 smk->buf_sizes[smk->curstream] = size; | 284 smk->buf_sizes[smk->curstream] = size; |
285 ret = get_buffer(&s->pb, smk->bufs[smk->curstream], size); | 285 ret = get_buffer(&s->pb, smk->bufs[smk->curstream], size); |
286 if(ret != size) | 286 if(ret != size) |
287 return AVERROR_IO; | 287 return AVERROR(EIO); |
288 smk->stream_id[smk->curstream] = smk->indexes[i]; | 288 smk->stream_id[smk->curstream] = smk->indexes[i]; |
289 } | 289 } |
290 flags >>= 1; | 290 flags >>= 1; |
291 } | 291 } |
292 if (av_new_packet(pkt, frame_size + 768)) | 292 if (av_new_packet(pkt, frame_size + 768)) |
295 palchange |= 2; | 295 palchange |= 2; |
296 pkt->data[0] = palchange; | 296 pkt->data[0] = palchange; |
297 memcpy(pkt->data + 1, smk->pal, 768); | 297 memcpy(pkt->data + 1, smk->pal, 768); |
298 ret = get_buffer(&s->pb, pkt->data + 769, frame_size); | 298 ret = get_buffer(&s->pb, pkt->data + 769, frame_size); |
299 if(ret != frame_size) | 299 if(ret != frame_size) |
300 return AVERROR_IO; | 300 return AVERROR(EIO); |
301 pkt->stream_index = smk->videoindex; | 301 pkt->stream_index = smk->videoindex; |
302 pkt->size = ret + 769; | 302 pkt->size = ret + 769; |
303 smk->cur_frame++; | 303 smk->cur_frame++; |
304 smk->nextpos = url_ftell(&s->pb); | 304 smk->nextpos = url_ftell(&s->pb); |
305 } else { | 305 } else { |