From d270aec9d139c6201e405fac7b0a3781fdb460d3 Mon Sep 17 00:00:00 2001 From: Jan Berkel Date: Thu, 23 Apr 2015 13:02:34 +0100 Subject: [PATCH] playback/player: ios: Make sure dimensions are valid Layouting code crashes if 0/0 get passed https://github.com/sdroege/gst-player/pull/22 --- playback/player/ios/GstPlay/VideoViewController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playback/player/ios/GstPlay/VideoViewController.m b/playback/player/ios/GstPlay/VideoViewController.m index 150c72aae0..5c752f2063 100644 --- a/playback/player/ios/GstPlay/VideoViewController.m +++ b/playback/player/ios/GstPlay/VideoViewController.m @@ -159,7 +159,9 @@ static void video_dimensions_changed (GstPlayer * unused, gint width, gint height, VideoViewController * self) { dispatch_async(dispatch_get_main_queue(), ^{ - [self videoDimensionsChanged:width height:height]; + if (width > 0 && height > 0) { + [self videoDimensionsChanged:width height:height]; + } }); }