diff options
author | François Revol <revol@free.fr> | 2007-02-13 18:26:14 +0000 |
---|---|---|
committer | François Revol <revol@free.fr> | 2007-02-13 18:26:14 +0000 |
commit | 8fa36ae09dddb1b639b4df5d505c0dbcf4e916e4 (patch) | |
tree | 551ead2b59bdc4b1855fb60d6c2ce6a2c7787f15 /libavcodec/dv.c | |
parent | bcdf0d269748e2059ffa789033cd6e41739891fc (diff) | |
download | ffmpeg-8fa36ae09dddb1b639b4df5d505c0dbcf4e916e4.tar.gz |
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.
Originally committed as revision 7965 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r-- | libavcodec/dv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 505c88d494..b5f15df27a 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -125,7 +125,7 @@ static int dvvideo_init(AVCodecContext *avctx) dv_vlc_map = av_mallocz_static(DV_VLC_MAP_LEV_SIZE*DV_VLC_MAP_RUN_SIZE*sizeof(struct dv_vlc_pair)); if (!dv_vlc_map) - return -ENOMEM; + return AVERROR(ENOMEM); /* dv_anchor lets each thread know its Id */ for (i=0; i<DV_ANCHOR_SIZE; i++) @@ -157,7 +157,7 @@ static int dvvideo_init(AVCodecContext *avctx) dv_rl_vlc = av_mallocz_static(dv_vlc.table_size * sizeof(RL_VLC_ELEM)); if (!dv_rl_vlc) - return -ENOMEM; + return AVERROR(ENOMEM); for(i = 0; i < dv_vlc.table_size; i++){ int code= dv_vlc.table[i][0]; |