[FFmpeg-cvslog] r9759 - in trunk: cmdutils.c libavformat/4xm.c libavformat/aiff.c libavformat/amr.c libavformat/apc.c libavformat/avs.c libavformat/bethsoftvid.c libavformat/c93.c libavformat/dsicin.c libavformat/dxa.c libavformat/electronicarts.c libavformat/flic.c libavformat/flvdec.c libavformat/idcin.c libavformat/idroq.c libavformat/ipmovie.c libavformat/matroskadec.c libavformat/mm.c libavformat/mmf.c libavformat/mp3.c libavformat/mpc.c libavformat/mtv.c libavformat/nut.c libavformat/nutdec.c libavformat/ogg.c libavformat/ogg2.c libavformat/psxstr.c libavformat/raw.c libavformat/rtsp.c libavformat/segafilm.c libavformat/sierravmd.c libavformat/smacker.c libavformat/thp.c libavformat/tiertexseq.c libavformat/tta.c libavformat/txd.c libavformat/utils.c libavformat/vocdec.c libavformat/wav.c libavformat/wc3movie.c libavformat/westwood.c libavformat/wv.c

takis subversion
Thu Jul 19 17:21:31 CEST 2007


Author: takis
Date: Thu Jul 19 17:21:30 2007
New Revision: 9759

Log:
Replace all occurrances of AVERROR_NOMEM with AVERROR(ENOMEM).


Modified:
   trunk/cmdutils.c
   trunk/libavformat/4xm.c
   trunk/libavformat/aiff.c
   trunk/libavformat/amr.c
   trunk/libavformat/apc.c
   trunk/libavformat/avs.c
   trunk/libavformat/bethsoftvid.c
   trunk/libavformat/c93.c
   trunk/libavformat/dsicin.c
   trunk/libavformat/dxa.c
   trunk/libavformat/electronicarts.c
   trunk/libavformat/flic.c
   trunk/libavformat/flvdec.c
   trunk/libavformat/idcin.c
   trunk/libavformat/idroq.c
   trunk/libavformat/ipmovie.c
   trunk/libavformat/matroskadec.c
   trunk/libavformat/mm.c
   trunk/libavformat/mmf.c
   trunk/libavformat/mp3.c
   trunk/libavformat/mpc.c
   trunk/libavformat/mtv.c
   trunk/libavformat/nut.c
   trunk/libavformat/nutdec.c
   trunk/libavformat/ogg.c
   trunk/libavformat/ogg2.c
   trunk/libavformat/psxstr.c
   trunk/libavformat/raw.c
   trunk/libavformat/rtsp.c
   trunk/libavformat/segafilm.c
   trunk/libavformat/sierravmd.c
   trunk/libavformat/smacker.c
   trunk/libavformat/thp.c
   trunk/libavformat/tiertexseq.c
   trunk/libavformat/tta.c
   trunk/libavformat/txd.c
   trunk/libavformat/utils.c
   trunk/libavformat/vocdec.c
   trunk/libavformat/wav.c
   trunk/libavformat/wc3movie.c
   trunk/libavformat/westwood.c
   trunk/libavformat/wv.c

Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c	(original)
+++ trunk/cmdutils.c	Thu Jul 19 17:21:30 2007
@@ -138,7 +138,7 @@ void print_error(const char *filename, i
                 "Usually that means that input file is truncated and/or corrupted.\n",
                 filename);
         break;
-    case AVERROR_NOMEM:
+    case AVERROR(ENOMEM):
         fprintf(stderr, "%s: memory allocation error occured\n", filename);
         break;
     case AVERROR_NOENT:

Modified: trunk/libavformat/4xm.c
==============================================================================
--- trunk/libavformat/4xm.c	(original)
+++ trunk/libavformat/4xm.c	Thu Jul 19 17:21:30 2007
@@ -116,7 +116,7 @@ static int fourxm_read_header(AVFormatCo
     /* allocate space for the header and load the whole thing */
     header = av_malloc(header_size);
     if (!header)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     if (get_buffer(pb, header, header_size) != header_size)
         return AVERROR_IO;
 
@@ -140,7 +140,7 @@ static int fourxm_read_header(AVFormatCo
             /* allocate a new AVStream */
             st = av_new_stream(s, 0);
             if (!st)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
             av_set_pts_info(st, 60, 1, fourxm->fps);
 
             fourxm->video_stream_index = st->index;
@@ -166,7 +166,7 @@ static int fourxm_read_header(AVFormatCo
                     fourxm->track_count * sizeof(AudioTrack));
                 if (!fourxm->tracks) {
                     av_free(header);
-                    return AVERROR_NOMEM;
+                    return AVERROR(ENOMEM);
                 }
             }
             fourxm->tracks[current_track].adpcm = AV_RL32(&header[i + 12]);
@@ -178,7 +178,7 @@ static int fourxm_read_header(AVFormatCo
             /* allocate a new AVStream */
             st = av_new_stream(s, current_track);
             if (!st)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
 
             av_set_pts_info(st, 60, 1, fourxm->tracks[current_track].sample_rate);
 

Modified: trunk/libavformat/aiff.c
==============================================================================
--- trunk/libavformat/aiff.c	(original)
+++ trunk/libavformat/aiff.c	Thu Jul 19 17:21:30 2007
@@ -312,7 +312,7 @@ static int aiff_read_header(AVFormatCont
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     while (filesize > 0) {
         /* parse different chunks */

Modified: trunk/libavformat/amr.c
==============================================================================
--- trunk/libavformat/amr.c	(original)
+++ trunk/libavformat/amr.c	Thu Jul 19 17:21:30 2007
@@ -87,7 +87,7 @@ static int amr_read_header(AVFormatConte
     st = av_new_stream(s, 0);
     if (!st)
     {
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     }
     if(memcmp(header,AMR_header,6)!=0)
     {

Modified: trunk/libavformat/apc.c
==============================================================================
--- trunk/libavformat/apc.c	(original)
+++ trunk/libavformat/apc.c	Thu Jul 19 17:21:30 2007
@@ -41,7 +41,7 @@ static int apc_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;
@@ -53,7 +53,7 @@ static int apc_read_header(AVFormatConte
     st->codec->extradata = av_malloc(st->codec->extradata_size +
                                      FF_INPUT_BUFFER_PADDING_SIZE);
     if (!st->codec->extradata)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     /* initial predictor values for adpcm decoder */
     get_buffer(pb, st->codec->extradata, 2 * 4);

Modified: trunk/libavformat/avs.c
==============================================================================
--- trunk/libavformat/avs.c	(original)
+++ trunk/libavformat/avs.c	Thu Jul 19 17:21:30 2007
@@ -176,7 +176,7 @@ static int avs_read_packet(AVFormatConte
                 if (!avs->st_video) {
                     avs->st_video = av_new_stream(s, AVS_VIDEO);
                     if (avs->st_video == NULL)
-                        return AVERROR_NOMEM;
+                        return AVERROR(ENOMEM);
                     avs->st_video->codec->codec_type = CODEC_TYPE_VIDEO;
                     avs->st_video->codec->codec_id = CODEC_ID_AVS;
                     avs->st_video->codec->width = avs->width;
@@ -193,7 +193,7 @@ static int avs_read_packet(AVFormatConte
                 if (!avs->st_audio) {
                     avs->st_audio = av_new_stream(s, AVS_AUDIO);
                     if (avs->st_audio == NULL)
-                        return AVERROR_NOMEM;
+                        return AVERROR(ENOMEM);
                     avs->st_audio->codec->codec_type = CODEC_TYPE_AUDIO;
                 }
                 avs->remaining_audio_size = size - 4;

Modified: trunk/libavformat/bethsoftvid.c
==============================================================================
--- trunk/libavformat/bethsoftvid.c	(original)
+++ trunk/libavformat/bethsoftvid.c	Thu Jul 19 17:21:30 2007
@@ -71,7 +71,7 @@ static int vid_read_header(AVFormatConte
 
     stream = av_new_stream(s, 0);
     if (!stream)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(stream, 32, 1, 60);     // 16 ms increments, i.e. 60 fps
     stream->codec->codec_type = CODEC_TYPE_VIDEO;
     stream->codec->codec_id = CODEC_ID_BETHSOFTVID;
@@ -84,7 +84,7 @@ static int vid_read_header(AVFormatConte
     // done with video codec, set up audio codec
     stream = av_new_stream(s, 0);
     if (!stream)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     stream->codec->codec_type = CODEC_TYPE_AUDIO;
     stream->codec->codec_id = CODEC_ID_PCM_U8;
     stream->codec->channels = 1;
@@ -108,7 +108,7 @@ static int read_frame(BVID_DemuxContext 
 
     vidbuf_start = av_malloc(vidbuf_capacity = BUFFER_PADDING_SIZE);
     if(!vidbuf_start)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     // save the file position for the packet, include block type
     position = url_ftell(pb) - 1;
@@ -128,7 +128,7 @@ static int read_frame(BVID_DemuxContext 
     do{
         vidbuf_start = av_fast_realloc(vidbuf_start, &vidbuf_capacity, vidbuf_nbytes + BUFFER_PADDING_SIZE);
         if(!vidbuf_start)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
 
         code = get_byte(pb);
         vidbuf_start[vidbuf_nbytes++] = code;

Modified: trunk/libavformat/c93.c
==============================================================================
--- trunk/libavformat/c93.c	(original)
+++ trunk/libavformat/c93.c	Thu Jul 19 17:21:30 2007
@@ -77,7 +77,7 @@ static int read_header(AVFormatContext *
 
     video = av_new_stream(s, 0);
     if (!video)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     video->codec->codec_type = CODEC_TYPE_VIDEO;
     video->codec->codec_id = CODEC_ID_C93;
@@ -115,7 +115,7 @@ static int read_packet(AVFormatContext *
             if (!c93->audio) {
                 c93->audio = av_new_stream(s, 1);
                 if (!c93->audio)
-                    return AVERROR_NOMEM;
+                    return AVERROR(ENOMEM);
                 c93->audio->codec->codec_type = CODEC_TYPE_AUDIO;
             }
             url_fskip(pb, 26); /* VOC header */

Modified: trunk/libavformat/dsicin.c
==============================================================================
--- trunk/libavformat/dsicin.c	(original)
+++ trunk/libavformat/dsicin.c	Thu Jul 19 17:21:30 2007
@@ -108,7 +108,7 @@ static int cin_read_header(AVFormatConte
     /* initialize the video decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 32, 1, 12);
     cin->video_stream_index = st->index;
@@ -121,7 +121,7 @@ static int cin_read_header(AVFormatConte
     /* initialize the audio decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 32, 1, 22050);
     cin->audio_stream_index = st->index;
@@ -178,7 +178,7 @@ static int cin_read_packet(AVFormatConte
         pkt_size = (palette_type + 3) * hdr->pal_colors_count + hdr->video_frame_size;
 
         if (av_new_packet(pkt, 4 + pkt_size))
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
 
         pkt->stream_index = cin->video_stream_index;
         pkt->pts = cin->video_stream_pts++;
@@ -198,7 +198,7 @@ static int cin_read_packet(AVFormatConte
 
     /* audio packet */
     if (av_new_packet(pkt, cin->audio_buffer_size))
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     pkt->stream_index = cin->audio_stream_index;
     pkt->pts = cin->audio_stream_pts;

Modified: trunk/libavformat/dxa.c
==============================================================================
--- trunk/libavformat/dxa.c	(original)
+++ trunk/libavformat/dxa.c	Thu Jul 19 17:21:30 2007
@@ -160,7 +160,7 @@ static int dxa_read_packet(AVFormatConte
         switch(AV_RL32(buf)){
         case MKTAG('N', 'U', 'L', 'L'):
             if(av_new_packet(pkt, 4 + pal_size) < 0)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
             pkt->stream_index = 0;
             if(pal_size) memcpy(pkt->data, pal, pal_size);
             memcpy(pkt->data + pal_size, buf, 4);
@@ -181,7 +181,7 @@ static int dxa_read_packet(AVFormatConte
                 return -1;
             }
             if(av_new_packet(pkt, size + DXA_EXTRA_SIZE + pal_size) < 0)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
             memcpy(pkt->data + pal_size, buf, DXA_EXTRA_SIZE);
             ret = get_buffer(&s->pb, pkt->data + DXA_EXTRA_SIZE + pal_size, size);
             if(ret != size){

Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c	(original)
+++ trunk/libavformat/electronicarts.c	Thu Jul 19 17:21:30 2007
@@ -184,7 +184,7 @@ static int ea_read_header(AVFormatContex
     /* initialize the video decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, 90000);
     ea->video_stream_index = st->index;
     st->codec->codec_type = CODEC_TYPE_VIDEO;
@@ -195,7 +195,7 @@ static int ea_read_header(AVFormatContex
     /* initialize the audio decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, EA_SAMPLE_RATE);
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_ADPCM_EA;

Modified: trunk/libavformat/flic.c
==============================================================================
--- trunk/libavformat/flic.c	(original)
+++ trunk/libavformat/flic.c	Thu Jul 19 17:21:30 2007
@@ -86,7 +86,7 @@ static int flic_read_header(AVFormatCont
     /* initialize the decoder streams */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     flic->video_stream_index = st->index;
     st->codec->codec_type = CODEC_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_FLIC;

Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c	(original)
+++ trunk/libavformat/flvdec.c	Thu Jul 19 17:21:30 2007
@@ -237,14 +237,14 @@ static int flv_read_header(AVFormatConte
     if(flags & FLV_HEADER_FLAG_HASVIDEO){
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         st->codec->codec_type = CODEC_TYPE_VIDEO;
         av_set_pts_info(st, 24, 1, 1000); /* 24 bit pts in ms */
     }
     if(flags & FLV_HEADER_FLAG_HASAUDIO){
         st = av_new_stream(s, 1);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         st->codec->codec_type = CODEC_TYPE_AUDIO;
         av_set_pts_info(st, 24, 1, 1000); /* 24 bit pts in ms */
     }

Modified: trunk/libavformat/idcin.c
==============================================================================
--- trunk/libavformat/idcin.c	(original)
+++ trunk/libavformat/idcin.c	Thu Jul 19 17:21:30 2007
@@ -151,7 +151,7 @@ static int idcin_read_header(AVFormatCon
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, 90000);
     idcin->video_stream_index = st->index;
     st->codec->codec_type = CODEC_TYPE_VIDEO;
@@ -174,7 +174,7 @@ static int idcin_read_header(AVFormatCon
         idcin->audio_present = 1;
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, 90000);
         idcin->audio_stream_index = st->index;
         st->codec->codec_type = CODEC_TYPE_AUDIO;

Modified: trunk/libavformat/idroq.c
==============================================================================
--- trunk/libavformat/idroq.c	(original)
+++ trunk/libavformat/idroq.c	Thu Jul 19 17:21:30 2007
@@ -140,7 +140,7 @@ static int roq_read_header(AVFormatConte
     /* initialize the decoders */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     /* set the pts reference (1 pts = 1/90000) */
     av_set_pts_info(st, 33, 1, 90000);
     roq->video_stream_index = st->index;
@@ -153,7 +153,7 @@ static int roq_read_header(AVFormatConte
     if (roq->audio_channels) {
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, 90000);
         roq->audio_stream_index = st->index;
         st->codec->codec_type = CODEC_TYPE_AUDIO;

Modified: trunk/libavformat/ipmovie.c
==============================================================================
--- trunk/libavformat/ipmovie.c	(original)
+++ trunk/libavformat/ipmovie.c	Thu Jul 19 17:21:30 2007
@@ -551,7 +551,7 @@ static int ipmovie_read_header(AVFormatC
     /* initialize the stream decoders */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, 90000);
     ipmovie->video_stream_index = st->index;
     st->codec->codec_type = CODEC_TYPE_VIDEO;
@@ -566,7 +566,7 @@ static int ipmovie_read_header(AVFormatC
     if (ipmovie->audio_type) {
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, 90000);
         ipmovie->audio_stream_index = st->index;
         st->codec->codec_type = CODEC_TYPE_AUDIO;
@@ -598,7 +598,7 @@ static int ipmovie_read_packet(AVFormatC
     else if (ret == CHUNK_EOF)
         ret = AVERROR_IO;
     else if (ret == CHUNK_NOMEM)
-        ret = AVERROR_NOMEM;
+        ret = AVERROR(ENOMEM);
     else if (ret == CHUNK_VIDEO)
         ret = 0;
     else

Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c	(original)
+++ trunk/libavformat/matroskadec.c	Thu Jul 19 17:21:30 2007
@@ -485,7 +485,7 @@ ebml_read_ascii (MatroskaDemuxContext *m
      * byte more, read the string and NULL-terminate it ourselves. */
     if (size < 0 || !(*str = av_malloc(size + 1))) {
         av_log(matroska->ctx, AV_LOG_ERROR, "Memory allocation failed\n");
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     }
     if (get_buffer(pb, (uint8_t *) *str, size) != size) {
         offset_t pos = url_ftell(pb);
@@ -581,7 +581,7 @@ ebml_read_binary (MatroskaDemuxContext *
     if (!(*binary = av_malloc(*size))) {
         av_log(matroska->ctx, AV_LOG_ERROR,
                "Memory allocation error\n");
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     }
 
     if (get_buffer(pb, *binary, *size) != *size) {
@@ -2074,7 +2074,7 @@ matroska_read_header (AVFormatContext   
                 int sri = matroska_aac_sri(audiotrack->internal_samplerate);
                 extradata = av_malloc(5);
                 if (extradata == NULL)
-                    return AVERROR_NOMEM;
+                    return AVERROR(ENOMEM);
                 extradata[0] = (profile << 3) | ((sri&0x0E) >> 1);
                 extradata[1] = ((sri&0x01) << 7) | (audiotrack->channels<<3);
                 if (strstr(track->codec_id, "SBR")) {
@@ -2095,7 +2095,7 @@ matroska_read_header (AVFormatContext   
                 extradata_size = 30;
                 extradata = av_mallocz(extradata_size);
                 if (extradata == NULL)
-                    return AVERROR_NOMEM;
+                    return AVERROR(ENOMEM);
                 init_put_byte(&b, extradata, extradata_size, 1,
                               NULL, NULL, NULL, NULL);
                 put_buffer(&b, (uint8_t *) "TTA1", 4);
@@ -2164,7 +2164,7 @@ matroska_read_header (AVFormatContext   
             matroska->num_streams++;
             st = av_new_stream(s, track->stream_index);
             if (st == NULL)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
             av_set_pts_info(st, 64, matroska->time_scale, 1000*1000*1000); /* 64 bit pts in ns */
 
             st->codec->codec_id = codec_id;
@@ -2182,7 +2182,7 @@ matroska_read_header (AVFormatContext   
             } else if(track->codec_priv && track->codec_priv_size > 0){
                 st->codec->extradata = av_malloc(track->codec_priv_size);
                 if(st->codec->extradata == NULL)
-                    return AVERROR_NOMEM;
+                    return AVERROR(ENOMEM);
                 st->codec->extradata_size = track->codec_priv_size;
                 memcpy(st->codec->extradata,track->codec_priv+extradata_offset,
                        track->codec_priv_size);
@@ -2451,7 +2451,7 @@ matroska_parse_block(MatroskaDemuxContex
                     pkt = av_mallocz(sizeof(AVPacket));
                     /* XXX: prevent data copy... */
                     if (av_new_packet(pkt, slice_size-offset) < 0) {
-                        res = AVERROR_NOMEM;
+                        res = AVERROR(ENOMEM);
                         n = laces-1;
                         break;
                     }

Modified: trunk/libavformat/mm.c
==============================================================================
--- trunk/libavformat/mm.c	(original)
+++ trunk/libavformat/mm.c	Thu Jul 19 17:21:30 2007
@@ -95,7 +95,7 @@ static int mm_read_header(AVFormatContex
     /* video stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     st->codec->codec_type = CODEC_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_MMVIDEO;
     st->codec->codec_tag = 0;  /* no fourcc */
@@ -108,7 +108,7 @@ static int mm_read_header(AVFormatContex
     if (length == MM_HEADER_LEN_AV) {
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         st->codec->codec_type = CODEC_TYPE_AUDIO;
         st->codec->codec_tag = 0; /* no fourcc */
         st->codec->codec_id = CODEC_ID_PCM_U8;
@@ -168,7 +168,7 @@ static int mm_read_packet(AVFormatContex
         case MM_TYPE_INTER_HHV :
             /* output preamble + data */
             if (av_new_packet(pkt, length + MM_PREAMBLE_SIZE))
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
             memcpy(pkt->data, preamble, MM_PREAMBLE_SIZE);
             if (get_buffer(pb, pkt->data + MM_PREAMBLE_SIZE, length) != length)
                 return AVERROR_IO;
@@ -179,7 +179,7 @@ static int mm_read_packet(AVFormatContex
 
         case MM_TYPE_AUDIO :
             if (av_get_packet(&s->pb, pkt, length)<0)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
             pkt->size = length;
             pkt->stream_index = 1;
             pkt->pts = mm->audio_pts++;

Modified: trunk/libavformat/mmf.c
==============================================================================
--- trunk/libavformat/mmf.c	(original)
+++ trunk/libavformat/mmf.c	Thu Jul 19 17:21:30 2007
@@ -242,7 +242,7 @@ static int mmf_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA;

Modified: trunk/libavformat/mp3.c
==============================================================================
--- trunk/libavformat/mp3.c	(original)
+++ trunk/libavformat/mp3.c	Thu Jul 19 17:21:30 2007
@@ -433,7 +433,7 @@ static int mp3_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_MP3;

Modified: trunk/libavformat/mpc.c
==============================================================================
--- trunk/libavformat/mpc.c	(original)
+++ trunk/libavformat/mpc.c	Thu Jul 19 17:21:30 2007
@@ -92,7 +92,7 @@ static int mpc_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_MUSEPACK7;
     st->codec->channels = 2;

Modified: trunk/libavformat/mtv.c
==============================================================================
--- trunk/libavformat/mtv.c	(original)
+++ trunk/libavformat/mtv.c	Thu Jul 19 17:21:30 2007
@@ -96,7 +96,7 @@ static int mtv_read_header(AVFormatConte
 
     st = av_new_stream(s, VIDEO_SID);
     if(!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 64, 1, mtv->video_fps);
     st->codec->codec_type      = CODEC_TYPE_VIDEO;
@@ -111,7 +111,7 @@ static int mtv_read_header(AVFormatConte
 
     st = av_new_stream(s, AUDIO_SID);
     if(!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE);
     st->codec->codec_type      = CODEC_TYPE_AUDIO;

Modified: trunk/libavformat/nut.c
==============================================================================
--- trunk/libavformat/nut.c	(original)
+++ trunk/libavformat/nut.c	Thu Jul 19 17:21:30 2007
@@ -952,7 +952,7 @@ static int decode_stream_header(NUTConte
 
     st = av_new_stream(s, stream_id);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     class = get_v(bc);
     tmp = get_vb(bc);

Modified: trunk/libavformat/nutdec.c
==============================================================================
--- trunk/libavformat/nutdec.c	(original)
+++ trunk/libavformat/nutdec.c	Thu Jul 19 17:21:30 2007
@@ -293,7 +293,7 @@ static int decode_stream_header(NUTConte
 
     st = s->streams[stream_id];
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     class = get_v(bc);
     tmp = get_fourcc(bc);

Modified: trunk/libavformat/ogg.c
==============================================================================
--- trunk/libavformat/ogg.c	(original)
+++ trunk/libavformat/ogg.c	Thu Jul 19 17:21:30 2007
@@ -216,7 +216,7 @@ static int ogg_read_header(AVFormatConte
 
     ast = av_new_stream(avfcontext, 0) ;
     if(!ast)
-        return AVERROR_NOMEM ;
+        return AVERROR(ENOMEM) ;
     av_set_pts_info(ast, 60, 1, AV_TIME_BASE);
 
     codec= &ast->codec;

Modified: trunk/libavformat/ogg2.c
==============================================================================
--- trunk/libavformat/ogg2.c	(original)
+++ trunk/libavformat/ogg2.c	Thu Jul 19 17:21:30 2007
@@ -200,7 +200,7 @@ ogg_new_stream (AVFormatContext * s, uin
 
     st = av_new_stream (s, idx);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 64, 1, 1000000);
 

Modified: trunk/libavformat/psxstr.c
==============================================================================
--- trunk/libavformat/psxstr.c	(original)
+++ trunk/libavformat/psxstr.c	Thu Jul 19 17:21:30 2007
@@ -178,7 +178,7 @@ static int str_read_header(AVFormatConte
                 /* allocate a new AVStream */
                 st = av_new_stream(s, 0);
                 if (!st)
-                    return AVERROR_NOMEM;
+                    return AVERROR(ENOMEM);
                 av_set_pts_info(st, 64, 1, 15);
 
                 str->channels[channel].video_stream_index = st->index;
@@ -207,7 +207,7 @@ static int str_read_header(AVFormatConte
                 /* allocate a new AVStream */
                 st = av_new_stream(s, 0);
                 if (!st)
-                    return AVERROR_NOMEM;
+                    return AVERROR(ENOMEM);
                 av_set_pts_info(st, 64, 128, str->channels[channel].sample_rate);
 
                 str->channels[channel].audio_stream_index = st->index;

Modified: trunk/libavformat/raw.c
==============================================================================
--- trunk/libavformat/raw.c	(original)
+++ trunk/libavformat/raw.c	Thu Jul 19 17:21:30 2007
@@ -72,7 +72,7 @@ static int raw_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
         id = s->iformat->value;
         if (id == CODEC_ID_RAWVIDEO) {
@@ -222,7 +222,7 @@ static int ac3_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_AC3;
@@ -238,7 +238,7 @@ static int shorten_read_header(AVFormatC
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_SHORTEN;
     st->need_parsing = AVSTREAM_PARSE_FULL;
@@ -254,7 +254,7 @@ static int flac_read_header(AVFormatCont
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_FLAC;
     st->need_parsing = AVSTREAM_PARSE_FULL;
@@ -270,7 +270,7 @@ static int dts_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_DTS;
@@ -287,7 +287,7 @@ static int aac_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_AAC;
@@ -304,7 +304,7 @@ static int video_read_header(AVFormatCon
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = CODEC_TYPE_VIDEO;
     st->codec->codec_id = s->iformat->value;

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	(original)
+++ trunk/libavformat/rtsp.c	Thu Jul 19 17:21:30 2007
@@ -1044,7 +1044,7 @@ static int rtsp_read_header(AVFormatCont
         rtsp_st->rtp_ctx = rtp_parse_open(s, st, rtsp_st->rtp_handle, rtsp_st->sdp_payload_type, &rtsp_st->rtp_payload_data);
 
         if (!rtsp_st->rtp_ctx) {
-            err = AVERROR_NOMEM;
+            err = AVERROR(ENOMEM);
             goto fail;
         } else {
             if(rtsp_st->dynamic_handler) {
@@ -1384,7 +1384,7 @@ static int sdp_read_header(AVFormatConte
             s->ctx_flags |= AVFMTCTX_NOHEADER;
         rtsp_st->rtp_ctx = rtp_parse_open(s, st, rtsp_st->rtp_handle, rtsp_st->sdp_payload_type, &rtsp_st->rtp_payload_data);
         if (!rtsp_st->rtp_ctx) {
-            err = AVERROR_NOMEM;
+            err = AVERROR(ENOMEM);
             goto fail;
         } else {
             if(rtsp_st->dynamic_handler) {

Modified: trunk/libavformat/segafilm.c
==============================================================================
--- trunk/libavformat/segafilm.c	(original)
+++ trunk/libavformat/segafilm.c	Thu Jul 19 17:21:30 2007
@@ -130,7 +130,7 @@ static int film_read_header(AVFormatCont
     if (film->video_type) {
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         film->video_stream_index = st->index;
         st->codec->codec_type = CODEC_TYPE_VIDEO;
         st->codec->codec_id = film->video_type;
@@ -142,7 +142,7 @@ static int film_read_header(AVFormatCont
     if (film->audio_type) {
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         film->audio_stream_index = st->index;
         st->codec->codec_type = CODEC_TYPE_AUDIO;
         st->codec->codec_id = film->audio_type;
@@ -223,14 +223,14 @@ static int film_read_packet(AVFormatCont
         (film->video_type == CODEC_ID_CINEPAK)) {
         pkt->pos= url_ftell(pb);
         if (av_new_packet(pkt, sample->sample_size))
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         get_buffer(pb, pkt->data, sample->sample_size);
     } else if ((sample->stream == film->audio_stream_index) &&
         (film->audio_channels == 2)) {
         /* stereo PCM needs to be interleaved */
 
         if (av_new_packet(pkt, sample->sample_size))
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
 
         /* make sure the interleave buffer is large enough */
         if (sample->sample_size > film->stereo_buffer_size) {

Modified: trunk/libavformat/sierravmd.c
==============================================================================
--- trunk/libavformat/sierravmd.c	(original)
+++ trunk/libavformat/sierravmd.c	Thu Jul 19 17:21:30 2007
@@ -94,7 +94,7 @@ static int vmd_read_header(AVFormatConte
     /* start up the decoders */
     vst = av_new_stream(s, 0);
     if (!vst)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(vst, 33, 1, 10);
     vmd->video_stream_index = vst->index;
     vst->codec->codec_type = CODEC_TYPE_VIDEO;
@@ -111,7 +111,7 @@ static int vmd_read_header(AVFormatConte
     if (vmd->sample_rate) {
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         vmd->audio_stream_index = st->index;
         st->codec->codec_type = CODEC_TYPE_AUDIO;
         st->codec->codec_id = CODEC_ID_VMDAUDIO;
@@ -155,7 +155,7 @@ static int vmd_read_header(AVFormatConte
     if (!raw_frame_table || !vmd->frame_table) {
         av_free(raw_frame_table);
         av_free(vmd->frame_table);
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     }
     if (get_buffer(pb, raw_frame_table, raw_frame_table_size) !=
         raw_frame_table_size) {
@@ -257,7 +257,7 @@ static int vmd_read_packet(AVFormatConte
     url_fseek(pb, frame->frame_offset, SEEK_SET);
 
     if (av_new_packet(pkt, frame->frame_size + BYTES_PER_FRAME_RECORD))
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     pkt->pos= url_ftell(pb);
     memcpy(pkt->data, frame->frame_record, BYTES_PER_FRAME_RECORD);
     ret = get_buffer(pb, pkt->data + BYTES_PER_FRAME_RECORD,

Modified: trunk/libavformat/smacker.c
==============================================================================
--- trunk/libavformat/smacker.c	(original)
+++ trunk/libavformat/smacker.c	Thu Jul 19 17:21:30 2007
@@ -290,7 +290,7 @@ static int smacker_read_packet(AVFormatC
             flags >>= 1;
         }
         if (av_new_packet(pkt, frame_size + 768))
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         if(smk->frm_size[smk->cur_frame] & 1)
             palchange |= 2;
         pkt->data[0] = palchange;
@@ -304,7 +304,7 @@ static int smacker_read_packet(AVFormatC
         smk->nextpos = url_ftell(&s->pb);
     } else {
         if (av_new_packet(pkt, smk->buf_sizes[smk->curstream]))
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         memcpy(pkt->data, smk->bufs[smk->curstream], smk->buf_sizes[smk->curstream]);
         pkt->size = smk->buf_sizes[smk->curstream];
         pkt->stream_index = smk->stream_id[smk->curstream];

Modified: trunk/libavformat/thp.c
==============================================================================
--- trunk/libavformat/thp.c	(original)
+++ trunk/libavformat/thp.c	Thu Jul 19 17:21:30 2007
@@ -96,7 +96,7 @@ static int thp_read_header(AVFormatConte
             /* Video component.  */
             st = av_new_stream(s, 0);
             if (!st)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
 
             /* The denominator and numerator are switched because 1/fps
                is required.  */
@@ -119,7 +119,7 @@ static int thp_read_header(AVFormatConte
             /* Audio component.  */
             st = av_new_stream(s, 0);
             if (!st)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
 
             st->codec->codec_type = CODEC_TYPE_AUDIO;
             st->codec->codec_id = CODEC_ID_ADPCM_THP;

Modified: trunk/libavformat/tiertexseq.c
==============================================================================
--- trunk/libavformat/tiertexseq.c	(original)
+++ trunk/libavformat/tiertexseq.c	Thu Jul 19 17:21:30 2007
@@ -95,7 +95,7 @@ static int seq_init_frame_buffers(SeqDem
             seq_buffer->data_size = sz;
             seq_buffer->data = av_malloc(sz);
             if (!seq_buffer->data)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
         }
     }
     seq->frame_buffers_count = i;
@@ -208,7 +208,7 @@ static int seq_read_header(AVFormatConte
     /* initialize the video decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);
     seq->video_stream_index = st->index;
@@ -221,7 +221,7 @@ static int seq_read_header(AVFormatConte
     /* initialize the audio decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);
     seq->audio_stream_index = st->index;
@@ -251,7 +251,7 @@ static int seq_read_packet(AVFormatConte
         /* video packet */
         if (seq->current_pal_data_size + seq->current_video_data_size != 0) {
             if (av_new_packet(pkt, 1 + seq->current_pal_data_size + seq->current_video_data_size))
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
 
             pkt->data[0] = 0;
             if (seq->current_pal_data_size != 0) {

Modified: trunk/libavformat/tta.c
==============================================================================
--- trunk/libavformat/tta.c	(original)
+++ trunk/libavformat/tta.c	Thu Jul 19 17:21:30 2007
@@ -71,7 +71,7 @@ static int tta_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 64, 1, samplerate);
     st->start_time = 0;

Modified: trunk/libavformat/txd.c
==============================================================================
--- trunk/libavformat/txd.c	(original)
+++ trunk/libavformat/txd.c	Thu Jul 19 17:21:30 2007
@@ -41,7 +41,7 @@ static int txd_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     st->codec->codec_type = CODEC_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_TXD;
     st->codec->time_base.den = 5;

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Thu Jul 19 17:21:30 2007
@@ -195,10 +195,10 @@ int av_new_packet(AVPacket *pkt, int siz
 {
     uint8_t *data;
     if((unsigned)size > (unsigned)size + FF_INPUT_BUFFER_PADDING_SIZE)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
     if (!data)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     memset(data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
 
     av_init_packet(pkt);
@@ -233,10 +233,10 @@ int av_dup_packet(AVPacket *pkt)
         /* we duplicate the packet and don't forget to put the padding
            again */
         if((unsigned)pkt->size > (unsigned)pkt->size + FF_INPUT_BUFFER_PADDING_SIZE)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         data = av_malloc(pkt->size + FF_INPUT_BUFFER_PADDING_SIZE);
         if (!data) {
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         }
         memcpy(data, pkt->data, pkt->size);
         memset(data + pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
@@ -358,7 +358,7 @@ int av_open_input_stream(AVFormatContext
     else
         ic = *ic_ptr;
     if (!ic) {
-        err = AVERROR_NOMEM;
+        err = AVERROR(ENOMEM);
         goto fail;
     }
     ic->iformat = fmt;
@@ -372,7 +372,7 @@ int av_open_input_stream(AVFormatContext
     if (fmt->priv_data_size > 0) {
         ic->priv_data = av_mallocz(fmt->priv_data_size);
         if (!ic->priv_data) {
-            err = AVERROR_NOMEM;
+            err = AVERROR(ENOMEM);
             goto fail;
         }
     } else {
@@ -868,13 +868,13 @@ int av_read_frame(AVFormatContext *s, AV
 
             /* duplicate the packet */
             if (av_dup_packet(pkt) < 0)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
 
             while(*plast_pktl) plast_pktl= &(*plast_pktl)->next; //FIXME maybe maintain pointer to the last?
 
             pktl = av_mallocz(sizeof(AVPacketList));
             if (!pktl)
-                return AVERROR_NOMEM;
+                return AVERROR(ENOMEM);
 
             /* add the packet in the buffered packet list */
             *plast_pktl = pktl;
@@ -1727,7 +1727,7 @@ int av_find_stream_info(AVFormatContext 
     int codec_identified[MAX_STREAMS]={0};
 
     duration_error = av_mallocz(MAX_STREAMS * sizeof(*duration_error));
-    if (!duration_error) return AVERROR_NOMEM;
+    if (!duration_error) return AVERROR(ENOMEM);
 
     for(i=0;i<ic->nb_streams;i++) {
         st = ic->streams[i];
@@ -1807,7 +1807,7 @@ int av_find_stream_info(AVFormatContext 
 
         pktl = av_mallocz(sizeof(AVPacketList));
         if (!pktl) {
-            ret = AVERROR_NOMEM;
+            ret = AVERROR(ENOMEM);
             break;
         }
 
@@ -1820,7 +1820,7 @@ int av_find_stream_info(AVFormatContext 
 
         /* duplicate the packet */
         if (av_dup_packet(pkt) < 0) {
-            ret = AVERROR_NOMEM;
+            ret = AVERROR(ENOMEM);
             break;
         }
 
@@ -2088,7 +2088,7 @@ int av_set_parameters(AVFormatContext *s
     if (s->oformat->priv_data_size > 0) {
         s->priv_data = av_mallocz(s->oformat->priv_data_size);
         if (!s->priv_data)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
     } else
         s->priv_data = NULL;
 
@@ -2143,7 +2143,7 @@ int av_write_header(AVFormatContext *s)
     if (!s->priv_data && s->oformat->priv_data_size > 0) {
         s->priv_data = av_mallocz(s->oformat->priv_data_size);
         if (!s->priv_data)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
     }
 
     if(s->oformat->write_header){

Modified: trunk/libavformat/vocdec.c
==============================================================================
--- trunk/libavformat/vocdec.c	(original)
+++ trunk/libavformat/vocdec.c	Thu Jul 19 17:21:30 2007
@@ -52,7 +52,7 @@ static int voc_read_header(AVFormatConte
     url_fskip(pb, header_size);
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     st->codec->codec_type = CODEC_TYPE_AUDIO;
 
     voc->remaining_size = 0;

Modified: trunk/libavformat/wav.c
==============================================================================
--- trunk/libavformat/wav.c	(original)
+++ trunk/libavformat/wav.c	Thu Jul 19 17:21:30 2007
@@ -176,7 +176,7 @@ static int wav_read_header(AVFormatConte
         return -1;
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     get_wav_header(pb, st->codec, size);
     st->need_parsing = AVSTREAM_PARSE_FULL;

Modified: trunk/libavformat/wc3movie.c
==============================================================================
--- trunk/libavformat/wc3movie.c	(original)
+++ trunk/libavformat/wc3movie.c	Thu Jul 19 17:21:30 2007
@@ -238,7 +238,7 @@ static int wc3_read_header(AVFormatConte
     /* initialize the decoder streams */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, 90000);
     wc3->video_stream_index = st->index;
     st->codec->codec_type = CODEC_TYPE_VIDEO;
@@ -252,7 +252,7 @@ static int wc3_read_header(AVFormatConte
 
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, 90000);
     wc3->audio_stream_index = st->index;
     st->codec->codec_type = CODEC_TYPE_AUDIO;

Modified: trunk/libavformat/westwood.c
==============================================================================
--- trunk/libavformat/westwood.c	(original)
+++ trunk/libavformat/westwood.c	Thu Jul 19 17:21:30 2007
@@ -138,7 +138,7 @@ static int wsaud_read_header(AVFormatCon
     /* initialize the audio decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, wsaud->audio_samplerate);
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = wsaud->audio_type;
@@ -223,7 +223,7 @@ static int wsvqa_read_header(AVFormatCon
     /* initialize the video decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
     wsvqa->video_stream_index = st->index;
     st->codec->codec_type = CODEC_TYPE_VIDEO;
@@ -249,7 +249,7 @@ static int wsvqa_read_header(AVFormatCon
     if (AV_RL16(&header[24]) || (AV_RL16(&header[0]) == 1 && AV_RL16(&header[2]) == 1)) {
         st = av_new_stream(s, 0);
         if (!st)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
         st->codec->codec_type = CODEC_TYPE_AUDIO;
         if (AV_RL16(&header[0]) == 1)

Modified: trunk/libavformat/wv.c
==============================================================================
--- trunk/libavformat/wv.c	(original)
+++ trunk/libavformat/wv.c	Thu Jul 19 17:21:30 2007
@@ -177,7 +177,7 @@ static int wv_read_packet(AVFormatContex
     }
 
     if(av_new_packet(pkt, wc->blksize + WV_EXTRA_SIZE) < 0)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     memcpy(pkt->data, wc->extra, WV_EXTRA_SIZE);
     ret = get_buffer(&s->pb, pkt->data + WV_EXTRA_SIZE, wc->blksize);
     if(ret != wc->blksize){




More information about the ffmpeg-cvslog mailing list