This commit is contained in:
Xavi Artigas 2012-10-19 14:36:01 +02:00
parent dea0bd1f0b
commit 67461d3156

View file

@ -65,8 +65,7 @@ public class GStreamerSurfaceView extends SurfaceView {
height = media_height;
}
// Preserve aspect ratio if we are allowed freedom in both axes
// FIXME: Implement the case where only one axis is free
// Finally, calculate best size when both axis are free
if (hmode == View.MeasureSpec.AT_MOST && wmode == View.MeasureSpec.AT_MOST) {
int correct_height = width * media_height / media_width;
int correct_width = height * media_width / media_height;