diff options
Diffstat (limited to 'base/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java')
-rw-r--r-- | base/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/base/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java b/base/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java index 51c635154..8f52cf3de 100644 --- a/base/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java +++ b/base/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java @@ -119,6 +119,11 @@ public class VideoStreamingParameters { this.interval = params.interval; } if (params.resolution != null) { + if (this.resolution == null) { + this.resolution = new ImageResolution(); + resolution.setResolutionWidth(DEFAULT_WIDTH); + resolution.setResolutionHeight(DEFAULT_HEIGHT); + } if (params.resolution.getResolutionHeight() != null && params.resolution.getResolutionHeight() > 0) { this.resolution.setResolutionHeight(params.resolution.getResolutionHeight()); } @@ -152,6 +157,12 @@ public class VideoStreamingParameters { ImageResolution resolution = capability.getPreferredResolution(); if (resolution != null) { + if (this.resolution == null) { + this.resolution = new ImageResolution(); + resolution.setResolutionWidth(DEFAULT_WIDTH); + resolution.setResolutionHeight(DEFAULT_HEIGHT); + } + if (vehicleMake != null) { if ((vehicleMake.contains("Ford") || vehicleMake.contains("Lincoln")) && ((resolution.getResolutionHeight() != null && resolution.getResolutionHeight() > 800) || (resolution.getResolutionWidth() != null && resolution.getResolutionWidth() > 800))) { scale = 1.0 / 0.75; |