changeset 3091:0284d5b34916 libavcodec

Fix broken cosmetics commit and add a check for valid headers.
author banan
date Mon, 06 Feb 2006 11:21:10 +0000
parents 19260d5b8c39
children 421579792fc2
files cook.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cook.c	Mon Feb 06 11:03:37 2006 +0000
+++ b/cook.c	Mon Feb 06 11:21:10 2006 +0000
@@ -1225,10 +1225,10 @@
                 q->js_vlc_bits = e->js_vlc_bits;
             }
             if (q->samples_per_channel > 256) {
-                q->log2_numvector_size  = 6
+                q->log2_numvector_size  = 6;
             }
             if (q->samples_per_channel > 512) {
-                q->log2_numvector_size  = 7
+                q->log2_numvector_size  = 7;
             }
             break;
         case MC_COOK:
@@ -1282,6 +1282,11 @@
         av_log(NULL,AV_LOG_ERROR,"subbands > 50, report sample!\n");
         return -1;
     }
+    if ((q->samples_per_channel == 256) || (q->samples_per_channel == 512) || (q->samples_per_channel == 1024)) {
+    } else {
+        av_log(NULL,AV_LOG_ERROR,"unknown amount of samples_per_channel = %d, report sample!\n",q->samples_per_channel);
+        return -1;
+    }
 
 #ifdef COOKDEBUG
     dump_cook_context(q,e);