comparison img2.c @ 1787:eb16c64144ee libavformat

This fixes error handling for BeOS, removing the need for some ifdefs. AVERROR_ defines are moved to avcodec.h as they are needed in there as well. Feel free to move that to avutil/common.h. Bumped up avcodec/format version numbers as though it's binary compatible we will want to rebuild apps as error values changed. Please from now on use return AVERROR(EFOO) instead of the ugly return -EFOO in your code. This also removes the need for berrno.h.
author mmu_man
date Tue, 13 Feb 2007 18:26:14 +0000
parents ffb64cb62cc9
children b5e15030d788
comparison
equal deleted inserted replaced
1786:8cc34fe98a3b 1787:eb16c64144ee
175 175
176 s1->ctx_flags |= AVFMTCTX_NOHEADER; 176 s1->ctx_flags |= AVFMTCTX_NOHEADER;
177 177
178 st = av_new_stream(s1, 0); 178 st = av_new_stream(s1, 0);
179 if (!st) { 179 if (!st) {
180 return -ENOMEM; 180 return AVERROR(ENOMEM);
181 } 181 }
182 182
183 pstrcpy(s->path, sizeof(s->path), s1->filename); 183 pstrcpy(s->path, sizeof(s->path), s1->filename);
184 s->img_number = 0; 184 s->img_number = 0;
185 s->img_count = 0; 185 s->img_count = 0;