summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-10-01 12:31:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-10-01 12:31:11 +0000
commit9fe5a7b83107051812a00eaebb01db11d7378980 (patch)
tree17d978555c5402fdffa3d31a9c1e4fd144bd01bc /libavcodec
parentcacf7199a179eb360514bebcd068bed467c22e83 (diff)
downloadffmpeg-9fe5a7b83107051812a00eaebb01db11d7378980.tar.gz
do not call (av_)abort()
Originally committed as revision 3543 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/common.c2
-rw-r--r--libavcodec/mpegaudio.c2
-rw-r--r--libavcodec/utils.c3
-rw-r--r--libavcodec/xvmcvideo.c2
4 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/common.c b/libavcodec/common.c
index 72172fa4f7..0aa97d85a3 100644
--- a/libavcodec/common.c
+++ b/libavcodec/common.c
@@ -190,7 +190,7 @@ static int build_table(VLC *vlc, int table_nb_bits,
#endif
if (table[j][1] /*bits*/ != 0) {
av_log(NULL, AV_LOG_ERROR, "incorrect codes\n");
- av_abort();
+ return -1;
}
table[j][1] = n; //bits
table[j][0] = i; //code
diff --git a/libavcodec/mpegaudio.c b/libavcodec/mpegaudio.c
index ac773865ec..b0b5d68b60 100644
--- a/libavcodec/mpegaudio.c
+++ b/libavcodec/mpegaudio.c
@@ -466,7 +466,7 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT],
sf[1] = sf[2] = sf[0];
break;
default:
- av_abort();
+ assert(0); //cant happen
}
#if 0
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7579e6f316..21d885d221 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -726,7 +726,8 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
bitrate = enc->bit_rate;
break;
default:
- av_abort();
+ snprintf(buf, buf_size, "Invalid Codec type %d", enc->codec_type);
+ return;
}
if (encode) {
if (enc->flags & CODEC_FLAG_PASS1)
diff --git a/libavcodec/xvmcvideo.c b/libavcodec/xvmcvideo.c
index 04ea4069d3..c1ff42b1fa 100644
--- a/libavcodec/xvmcvideo.c
+++ b/libavcodec/xvmcvideo.c
@@ -136,7 +136,7 @@ const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
if(s->encoding){
av_log(s->avctx, AV_LOG_ERROR, "XVMC doesn't support encoding!!!\n");
- av_abort();
+ return -1;
}
//from MPV_decode_mb(),