shithub: h264bsd

Download patch

ref: 5bc1c54d5f46c44d7cc3ad581ab06b6adae40bf3
parent: f7849b3926738e3ea28ba5979effc05832a583e7
author: Sam Leitch <sam.leitch@calgaryscientific.com>
date: Mon Mar 31 06:54:34 EDT 2014

Fixed croppingParams in JS H264Decoder.

--- a/js/h264bsd_decoder.js
+++ b/js/h264bsd_decoder.js
@@ -272,15 +272,15 @@
  * Returns the info used to crop output images to there final viewing dimensions.
  * If this method returns null no cropping info is provided and the full image should be presented.
  */
-H264bsdDecoder.prototype.croppingInfo = function(){
+H264bsdDecoder.prototype.croppingParams = function() {
     var module = this.module;
     var pStorage = this.pStorage;
     
-    var pCroppingFlag = self.malloc_(4);
-    var pLeftOffset = self.malloc_(4);
-    var pWidth = self.malloc_(4);
-    var pTopOffset = self.malloc_(4);
-    var pHeight = self.malloc_(4);
+    var pCroppingFlag = self._malloc(4);
+    var pLeftOffset = self._malloc(4);
+    var pWidth = self._malloc(4);
+    var pTopOffset = self._malloc(4);
+    var pHeight = self._malloc(4);
 
     module._h264bsdCroppingParams(pStorage, pCroppingFlag, pLeftOffset, pWidth, pTopOffset, pHeight);
     
--- a/js/test.html
+++ b/js/test.html
@@ -12,11 +12,11 @@
     <!--This is where we will display decoded frames-->
     <canvas id="canvas" width="640" height="480" style="border:solid;"></canvas>
 
-    <script src="../js/h264bsd_asm.js"></script>
-    <script src="../js/h264bsd_decoder.js"></script>
-    <script src="../js/h264bsd_canvas.js"></script>
+    <script src="h264bsd_asm.js"></script>
+    <script src="h264bsd_decoder.js"></script>
+    <script src="h264bsd_canvas.js"></script>
        
-    <!--<script src="../js/h264bsd.min.js"></script>-->
+    <!--<script src="h264bsd.min.js"></script>-->
 
     <script type="text/javascript">         
         var canvas = document.getElementById('canvas');