diff sonic.c @ 4520:9bf957e669f0 libavcodec

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 c8c591fe26f8
children c2ab2ac31edb
line wrap: on
line diff
--- a/sonic.c	Tue Feb 13 16:06:50 2007 +0000
+++ b/sonic.c	Tue Feb 13 18:26:14 2007 +0000
@@ -601,7 +601,7 @@
 
     avctx->coded_frame = avcodec_alloc_frame();
     if (!avctx->coded_frame)
-        return -ENOMEM;
+        return AVERROR(ENOMEM);
     avctx->coded_frame->key_frame = 1;
     avctx->frame_size = s->block_align*s->downsampling;