comparison ape.c @ 5930:08cd1179a20d libavformat

Replace all remaining occurrences of AVERROR_NOMEM with AVERROR(ENOMEM). AVERROR_NOMEM is deprecated and will be dropped at the next libavutil major bump.
author stefano
date Sat, 03 Apr 2010 14:15:00 +0000
parents 536e5527c1e0
children
comparison
equal deleted inserted replaced
5929:903f1b00cbc6 5930:08cd1179a20d
246 av_log(s, AV_LOG_ERROR, "Too many frames: %d\n", ape->totalframes); 246 av_log(s, AV_LOG_ERROR, "Too many frames: %d\n", ape->totalframes);
247 return -1; 247 return -1;
248 } 248 }
249 ape->frames = av_malloc(ape->totalframes * sizeof(APEFrame)); 249 ape->frames = av_malloc(ape->totalframes * sizeof(APEFrame));
250 if(!ape->frames) 250 if(!ape->frames)
251 return AVERROR_NOMEM; 251 return AVERROR(ENOMEM);
252 ape->firstframe = ape->junklength + ape->descriptorlength + ape->headerlength + ape->seektablelength + ape->wavheaderlength; 252 ape->firstframe = ape->junklength + ape->descriptorlength + ape->headerlength + ape->seektablelength + ape->wavheaderlength;
253 ape->currentframe = 0; 253 ape->currentframe = 0;
254 254
255 255
256 ape->totalsamples = ape->finalframeblocks; 256 ape->totalsamples = ape->finalframeblocks;
349 nblocks = ape->finalframeblocks; 349 nblocks = ape->finalframeblocks;
350 else 350 else
351 nblocks = ape->blocksperframe; 351 nblocks = ape->blocksperframe;
352 352
353 if (av_new_packet(pkt, ape->frames[ape->currentframe].size + extra_size) < 0) 353 if (av_new_packet(pkt, ape->frames[ape->currentframe].size + extra_size) < 0)
354 return AVERROR_NOMEM; 354 return AVERROR(ENOMEM);
355 355
356 AV_WL32(pkt->data , nblocks); 356 AV_WL32(pkt->data , nblocks);
357 AV_WL32(pkt->data + 4, ape->frames[ape->currentframe].skip); 357 AV_WL32(pkt->data + 4, ape->frames[ape->currentframe].skip);
358 ret = get_buffer(s->pb, pkt->data + extra_size, ape->frames[ape->currentframe].size); 358 ret = get_buffer(s->pb, pkt->data + extra_size, ape->frames[ape->currentframe].size);
359 359