comparison raw.c @ 2273:7eb456c4ed8a libavformat

Replace all occurrences of AVERROR_NOMEM with AVERROR(ENOMEM).
author takis
date Thu, 19 Jul 2007 15:21:30 +0000
parents 7ad682f38b9a
children b21c2af60bc9
comparison
equal deleted inserted replaced
2272:8963d9ed1859 2273:7eb456c4ed8a
70 AVStream *st; 70 AVStream *st;
71 int id; 71 int id;
72 72
73 st = av_new_stream(s, 0); 73 st = av_new_stream(s, 0);
74 if (!st) 74 if (!st)
75 return AVERROR_NOMEM; 75 return AVERROR(ENOMEM);
76 76
77 id = s->iformat->value; 77 id = s->iformat->value;
78 if (id == CODEC_ID_RAWVIDEO) { 78 if (id == CODEC_ID_RAWVIDEO) {
79 st->codec->codec_type = CODEC_TYPE_VIDEO; 79 st->codec->codec_type = CODEC_TYPE_VIDEO;
80 } else { 80 } else {
220 { 220 {
221 AVStream *st; 221 AVStream *st;
222 222
223 st = av_new_stream(s, 0); 223 st = av_new_stream(s, 0);
224 if (!st) 224 if (!st)
225 return AVERROR_NOMEM; 225 return AVERROR(ENOMEM);
226 226
227 st->codec->codec_type = CODEC_TYPE_AUDIO; 227 st->codec->codec_type = CODEC_TYPE_AUDIO;
228 st->codec->codec_id = CODEC_ID_AC3; 228 st->codec->codec_id = CODEC_ID_AC3;
229 st->need_parsing = AVSTREAM_PARSE_FULL; 229 st->need_parsing = AVSTREAM_PARSE_FULL;
230 /* the parameters will be extracted from the compressed bitstream */ 230 /* the parameters will be extracted from the compressed bitstream */
236 { 236 {
237 AVStream *st; 237 AVStream *st;
238 238
239 st = av_new_stream(s, 0); 239 st = av_new_stream(s, 0);
240 if (!st) 240 if (!st)
241 return AVERROR_NOMEM; 241 return AVERROR(ENOMEM);
242 st->codec->codec_type = CODEC_TYPE_AUDIO; 242 st->codec->codec_type = CODEC_TYPE_AUDIO;
243 st->codec->codec_id = CODEC_ID_SHORTEN; 243 st->codec->codec_id = CODEC_ID_SHORTEN;
244 st->need_parsing = AVSTREAM_PARSE_FULL; 244 st->need_parsing = AVSTREAM_PARSE_FULL;
245 /* the parameters will be extracted from the compressed bitstream */ 245 /* the parameters will be extracted from the compressed bitstream */
246 return 0; 246 return 0;
252 { 252 {
253 AVStream *st; 253 AVStream *st;
254 254
255 st = av_new_stream(s, 0); 255 st = av_new_stream(s, 0);
256 if (!st) 256 if (!st)
257 return AVERROR_NOMEM; 257 return AVERROR(ENOMEM);
258 st->codec->codec_type = CODEC_TYPE_AUDIO; 258 st->codec->codec_type = CODEC_TYPE_AUDIO;
259 st->codec->codec_id = CODEC_ID_FLAC; 259 st->codec->codec_id = CODEC_ID_FLAC;
260 st->need_parsing = AVSTREAM_PARSE_FULL; 260 st->need_parsing = AVSTREAM_PARSE_FULL;
261 /* the parameters will be extracted from the compressed bitstream */ 261 /* the parameters will be extracted from the compressed bitstream */
262 return 0; 262 return 0;
268 { 268 {
269 AVStream *st; 269 AVStream *st;
270 270
271 st = av_new_stream(s, 0); 271 st = av_new_stream(s, 0);
272 if (!st) 272 if (!st)
273 return AVERROR_NOMEM; 273 return AVERROR(ENOMEM);
274 274
275 st->codec->codec_type = CODEC_TYPE_AUDIO; 275 st->codec->codec_type = CODEC_TYPE_AUDIO;
276 st->codec->codec_id = CODEC_ID_DTS; 276 st->codec->codec_id = CODEC_ID_DTS;
277 st->need_parsing = AVSTREAM_PARSE_FULL; 277 st->need_parsing = AVSTREAM_PARSE_FULL;
278 /* the parameters will be extracted from the compressed bitstream */ 278 /* the parameters will be extracted from the compressed bitstream */
285 { 285 {
286 AVStream *st; 286 AVStream *st;
287 287
288 st = av_new_stream(s, 0); 288 st = av_new_stream(s, 0);
289 if (!st) 289 if (!st)
290 return AVERROR_NOMEM; 290 return AVERROR(ENOMEM);
291 291
292 st->codec->codec_type = CODEC_TYPE_AUDIO; 292 st->codec->codec_type = CODEC_TYPE_AUDIO;
293 st->codec->codec_id = CODEC_ID_AAC; 293 st->codec->codec_id = CODEC_ID_AAC;
294 st->need_parsing = AVSTREAM_PARSE_FULL; 294 st->need_parsing = AVSTREAM_PARSE_FULL;
295 /* the parameters will be extracted from the compressed bitstream */ 295 /* the parameters will be extracted from the compressed bitstream */
302 { 302 {
303 AVStream *st; 303 AVStream *st;
304 304
305 st = av_new_stream(s, 0); 305 st = av_new_stream(s, 0);
306 if (!st) 306 if (!st)
307 return AVERROR_NOMEM; 307 return AVERROR(ENOMEM);
308 308
309 st->codec->codec_type = CODEC_TYPE_VIDEO; 309 st->codec->codec_type = CODEC_TYPE_VIDEO;
310 st->codec->codec_id = s->iformat->value; 310 st->codec->codec_id = s->iformat->value;
311 st->need_parsing = AVSTREAM_PARSE_FULL; 311 st->need_parsing = AVSTREAM_PARSE_FULL;
312 312