framepositioner: Prevent division by zero
authorSebastian Dröge <sebastian@centricular.com>
Tue, 28 Feb 2017 13:39:27 +0000 (15:39 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 28 Feb 2017 13:40:08 +0000 (15:40 +0200)
CID 1369046
CID 1369047

ges/gstframepositioner.c

index 8acb700..e294768 100644 (file)
@@ -101,6 +101,7 @@ gst_frame_positioner_update_properties (GstFramePositioner * pos,
 
   if (old_track_width && pos->width == old_track_width &&
       old_track_height && pos->height == old_track_height &&
+      pos->track_height && pos->track_width &&
       ((float) old_track_width / (float) old_track_height) ==
       ((float) pos->track_width / (float) pos->track_height)) {