Revision 2874c81c libavformat/oggenc.c

View differences:

libavformat/oggenc.c
121 121
    oggstream->header[0] = av_mallocz(51); // per ogg flac specs
122 122
    p = oggstream->header[0];
123 123
    if (!p)
124
        return AVERROR_NOMEM;
124
        return AVERROR(ENOMEM);
125 125
    bytestream_put_byte(&p, 0x7F);
126 126
    bytestream_put_buffer(&p, "FLAC", 4);
127 127
    bytestream_put_byte(&p, 1); // major version
......
135 135
    // second packet: VorbisComment
136 136
    p = ogg_write_vorbiscomment(4, bitexact, &oggstream->header_len[1], m);
137 137
    if (!p)
138
        return AVERROR_NOMEM;
138
        return AVERROR(ENOMEM);
139 139
    oggstream->header[1] = p;
140 140
    bytestream_put_byte(&p, 0x84); // last metadata block and vorbis comment
141 141
    bytestream_put_be24(&p, oggstream->header_len[1] - 4);
......
157 157
    // first packet: Speex header
158 158
    p = av_mallocz(SPEEX_HEADER_SIZE);
159 159
    if (!p)
160
        return AVERROR_NOMEM;
160
        return AVERROR(ENOMEM);
161 161
    oggstream->header[0] = p;
162 162
    oggstream->header_len[0] = SPEEX_HEADER_SIZE;
163 163
    bytestream_put_buffer(&p, avctx->extradata, SPEEX_HEADER_SIZE);
......
166 166
    // second packet: VorbisComment
167 167
    p = ogg_write_vorbiscomment(0, bitexact, &oggstream->header_len[1], m);
168 168
    if (!p)
169
        return AVERROR_NOMEM;
169
        return AVERROR(ENOMEM);
170 170
    oggstream->header[1] = p;
171 171

  
172 172
    return 0;

Also available in: Unified diff