winlin

update the srs player, set the DAR.

@@ -106,20 +106,17 @@ package @@ -106,20 +106,17 @@ package
106 public function js_call_dar(num:int, den:int):int { 106 public function js_call_dar(num:int, den:int):int {
107 if (this.video && num > 0 && den > 0 && this.video.width > 0) { 107 if (this.video && num > 0 && den > 0 && this.video.width > 0) {
108 // set DAR. 108 // set DAR.
109 - if (num < den) {  
110 - // calc the height by DAR  
111 - var _height:int = this.video.width * num / den;  
112 - 109 + // calc the height by DAR
  110 + var _height:int = this.w * num / den;
  111 + if (_height <= this.h) {
  112 + this.video.width = this.w;
  113 + this.video.height = _height;
  114 + } else {
113 // height overflow, calc the width by DAR 115 // height overflow, calc the width by DAR
114 - if (_height > this.h) {  
115 - var _width:int = this.video.height * den / num;  
116 -  
117 - this.video.width = _width;  
118 - this.video.height = this.h;  
119 - } else {  
120 - this.video.width = this.w;  
121 - this.video.height = _height;  
122 - } 116 + var _width:int = this.h * den / num;
  117 +
  118 + this.video.width = _width;
  119 + this.video.height = this.h;
123 } 120 }
124 121
125 // align center. 122 // align center.