changeset 9544:e5afd314bd14 libavcodec

Handle WavPack INT32INFO chunks with nonzero post shift
author kostya
date Thu, 23 Apr 2009 18:21:16 +0000
parents a00e7601b584
children 59073f92f0e2
files wavpack.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/wavpack.c	Thu Apr 23 17:27:04 2009 +0000
+++ b/wavpack.c	Thu Apr 23 18:21:16 2009 +0000
@@ -780,12 +780,14 @@
             got_hybrid = 1;
             break;
         case WP_ID_INT32INFO:
-            if(size != 4 || *buf){
+            if(size != 4){
                 av_log(avctx, AV_LOG_ERROR, "Invalid INT32INFO, size = %i, sent_bits = %i\n", size, *buf);
                 buf += ssize;
                 continue;
             }
-            if(buf[1])
+            if(buf[0])
+                s->post_shift = buf[0];
+            else if(buf[1])
                 s->shift = buf[1];
             else if(buf[2]){
                 s->and = s->or = 1;