Skip to content

Commit

Permalink
Update SrsCameraView.java
Browse files Browse the repository at this point in the history
  • Loading branch information
thegobot authored Mar 7, 2019
1 parent 826a822 commit 0ed6343
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions library/src/main/java/net/ossrs/yasea/SrsCameraView.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,11 @@ public void setPreviewCallback(Camera.PreviewCallback previewCallback){

public int[] setPreviewResolution(int width, int height) {

if (mCamera == null) {
mCamera = openCamera();
if (mCamera == null) {
return new int[] { 0, 0};
}
}
if (mCamera != null) {
stopCamera();
}

mCamera = openCamera();

mPreviewWidth = width;
mPreviewHeight = height;
Expand Down

0 comments on commit 0ed6343

Please sign in to comment.