[FFmpeg-soc] [soc]: r1859 - aac/aac.c

andoma subversion at mplayerhq.hu
Thu Jan 31 16:21:29 CET 2008


Author: andoma
Date: Thu Jan 31 16:21:28 2008
New Revision: 1859

Log:
Gracefully bail out of we encounter an unsupported audio object type


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Thu Jan 31 16:21:28 2008
@@ -693,8 +693,6 @@ static int AudioSpecificConfig(AACContex
     memset(&ac->pcs, 0, sizeof(ac->pcs));
 
     ac->audioObjectType = GetAudioObjectType(&gb);
-    assert(ac->audioObjectType == AOT_AAC_LC || //ac->audioObjectType == AOT_AAC_MAIN ||
-            ac->audioObjectType == AOT_AAC_LTP || ac->audioObjectType == AOT_AAC_SSR);
     if (GetSampleRate(&gb, &ac->sampling_index, &ac->sample_rate)) return -1;
     ac->channels = get_bits(&gb, 4);
     //assert(ac->channels == 2);
@@ -710,21 +708,16 @@ static int AudioSpecificConfig(AACContex
     }
 
     switch (ac->audioObjectType) {
-        case AOT_AAC_MAIN:
         case AOT_AAC_LC:
         case AOT_AAC_SSR:
         case AOT_AAC_LTP:
-        case AOT_AAC_SCALABLE:
-        case AOT_TWINVQ:
             if (GASpecificConfig(ac, &gb))
                 return -1;
             break;
-        case AOT_SBR:
+        default:
+            av_log(ac->avccontext, AV_LOG_ERROR, "Audio object type %s%d is not supported",
+                   ac->sbr_present ? "SBR+" : "", ac->audioObjectType);
             return -1;
-        case AOT_CELP:
-        case AOT_HVXC:
-            assert(0);
-            break;
     };
     if ((ac->ext_audioObjectType != 5) && (8 * data_size - get_bits_count(&gb) >= 16)) {
         if (get_bits(&gb, 11) == 0x2b7) { // syncExtensionType



More information about the FFmpeg-soc mailing list