changeset 2281:7b345b735ac7 libavcodec

do not call (av_)abort()
author michael
date Fri, 01 Oct 2004 12:31:11 +0000
parents 785b6b4682b5
children e8d3609e89a5
files common.c mpegaudio.c utils.c xvmcvideo.c
diffstat 4 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/common.c	Thu Sep 30 15:02:07 2004 +0000
+++ b/common.c	Fri Oct 01 12:31:11 2004 +0000
@@ -190,7 +190,7 @@
 #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
--- a/mpegaudio.c	Thu Sep 30 15:02:07 2004 +0000
+++ b/mpegaudio.c	Fri Oct 01 12:31:11 2004 +0000
@@ -466,7 +466,7 @@
             sf[1] = sf[2] = sf[0];
             break;
         default:
-            av_abort();
+            assert(0); //cant happen
         }
         
 #if 0
--- a/utils.c	Thu Sep 30 15:02:07 2004 +0000
+++ b/utils.c	Fri Oct 01 12:31:11 2004 +0000
@@ -726,7 +726,8 @@
         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)
--- a/xvmcvideo.c	Thu Sep 30 15:02:07 2004 +0000
+++ b/xvmcvideo.c	Fri Oct 01 12:31:11 2004 +0000
@@ -136,7 +136,7 @@
 
     if(s->encoding){
         av_log(s->avctx, AV_LOG_ERROR, "XVMC doesn't support encoding!!!\n");
-	av_abort();
+        return -1;
     }
 
    //from MPV_decode_mb(),