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 /ffmpeg.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 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1797,12 +1797,12 @@ static int av_encode(AVFormatContext **output_files, int in_file_index = meta_data_maps[i].in_file; if ( out_file_index < 0 || out_file_index >= nb_output_files ) { fprintf(stderr, "Invalid output file index %d map_meta_data(%d,%d)\n", out_file_index, out_file_index, in_file_index); - ret = -EINVAL; + ret = AVERROR(EINVAL); goto fail; } if ( in_file_index < 0 || in_file_index >= nb_input_files ) { fprintf(stderr, "Invalid input file index %d map_meta_data(%d,%d)\n", in_file_index, out_file_index, in_file_index); - ret = -EINVAL; + ret = AVERROR(EINVAL); goto fail; } @@ -1824,7 +1824,7 @@ static int av_encode(AVFormatContext **output_files, os = output_files[i]; if (av_write_header(os) < 0) { fprintf(stderr, "Could not write header for output file #%d (incorrect codec parameters ?)\n", i); - ret = -EINVAL; + ret = AVERROR(EINVAL); goto fail; } } @@ -2027,7 +2027,7 @@ static int av_encode(AVFormatContext **output_files, } return ret; fail: - ret = -ENOMEM; + ret = AVERROR(ENOMEM); goto fail1; } |