]> granicus.if.org Git - handbrake/commitdiff
libhb: fix a problem decoding wmapro audio
authorjstebbins <jstebbins.hb@gmail.com>
Sat, 22 Feb 2014 00:21:43 +0000 (00:21 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sat, 22 Feb 2014 00:21:43 +0000 (00:21 +0000)
... and probably some other audio types.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6054 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/decavcodec.c

index 1a3132eb645198c21515736ab368a2369f18a993..4a0b925a7e5213711653d52cd1604b22d0e9630f 100644 (file)
@@ -667,10 +667,9 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf,
             }
             else
             {
-                pbuffer = buf->data;
-                len = pbuffer_size = buf->size;
+                pbuffer = buf->data + pos;
+                len = pbuffer_size = buf->size - pos;
             }
-            pos += len;
 
             // libavcodec can't decode TrueHD Mono (bug #356)
             // work around it by requesting Stereo before decoding
@@ -770,6 +769,7 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf,
                     break;
                 }
             }
+            pos += len;
         }
         buf = buf->next;
     }