comparison mpegtsenc.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 28ca2d77f997
comparison
equal deleted inserted replaced
5929:903f1b00cbc6 5930:08cd1179a20d
431 } 431 }
432 if (st->codec->codec_id == CODEC_ID_AAC && 432 if (st->codec->codec_id == CODEC_ID_AAC &&
433 st->codec->extradata_size > 0) { 433 st->codec->extradata_size > 0) {
434 ts_st->adts = av_mallocz(sizeof(*ts_st->adts)); 434 ts_st->adts = av_mallocz(sizeof(*ts_st->adts));
435 if (!ts_st->adts) 435 if (!ts_st->adts)
436 return AVERROR_NOMEM; 436 return AVERROR(ENOMEM);
437 if (ff_adts_decode_extradata(s, ts_st->adts, st->codec->extradata, 437 if (ff_adts_decode_extradata(s, ts_st->adts, st->codec->extradata,
438 st->codec->extradata_size) < 0) 438 st->codec->extradata_size) < 0)
439 return -1; 439 return -1;
440 } 440 }
441 } 441 }
834 new_size = ADTS_HEADER_SIZE+adts->pce_size+pkt->size; 834 new_size = ADTS_HEADER_SIZE+adts->pce_size+pkt->size;
835 if ((unsigned)new_size >= INT_MAX) 835 if ((unsigned)new_size >= INT_MAX)
836 return -1; 836 return -1;
837 data = av_malloc(new_size); 837 data = av_malloc(new_size);
838 if (!data) 838 if (!data)
839 return AVERROR_NOMEM; 839 return AVERROR(ENOMEM);
840 ff_adts_write_frame_header(adts, data, pkt->size, adts->pce_size); 840 ff_adts_write_frame_header(adts, data, pkt->size, adts->pce_size);
841 if (adts->pce_size) { 841 if (adts->pce_size) {
842 memcpy(data+ADTS_HEADER_SIZE, adts->pce_data, adts->pce_size); 842 memcpy(data+ADTS_HEADER_SIZE, adts->pce_data, adts->pce_size);
843 adts->pce_size = 0; 843 adts->pce_size = 0;
844 } 844 }