playback/player: ios: Make sure dimensions are valid

Layouting code crashes if 0/0 get passed

https://github.com/sdroege/gst-player/pull/22
This commit is contained in:
Jan Berkel 2015-04-23 13:02:34 +01:00 committed by Sebastian Dröge
parent 109e63d7d7
commit d270aec9d1

View file

@ -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];
}
});
}