summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-01-30 08:32:06 +0000
committerphintuka <phintuka>2010-01-30 08:32:06 +0000
commitb4c3c574ffd06d3e11fb7ad9c0e3cb5d458df79b (patch)
treebf916087792f7e09afa80815165618ed0c74c182
parent9b0a476fef5ab15dfc70fb6eaff244293a0cf22d (diff)
downloadxineliboutput-b4c3c574ffd06d3e11fb7ad9c0e3cb5d458df79b.tar.gz
xineliboutput-b4c3c574ffd06d3e11fb7ad9c0e3cb5d458df79b.tar.bz2
Fixed segfault when closing OSD
(only SHOW events have event->object.overlay)
-rw-r--r--xine_post_autocrop.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xine_post_autocrop.c b/xine_post_autocrop.c
index 3ad1f4db..28185a7b 100644
--- a/xine_post_autocrop.c
+++ b/xine_post_autocrop.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_post_autocrop.c,v 1.37 2010-01-19 00:09:52 phintuka Exp $
+ * $Id: xine_post_autocrop.c,v 1.38 2010-01-30 08:32:06 phintuka Exp $
*
*/
@@ -1454,12 +1454,14 @@ static int32_t autocrop_overlay_add_event(video_overlay_manager_t *this_gen, voi
pthread_mutex_unlock(&this->crop_lock);
if(cropping_active && crop_total>10) {
+ if (event->event_type == OVERLAY_EVENT_SHOW
#ifdef VO_CAP_CUSTOM_EXTENT_OVERLAY
- /* Do not move overlay if video_out has independent video and OSD resolutions */
- if (event->object.overlay->extent_width <= 0 ||
- event->object.overlay->extent_height <= 0)
+ /* Do not move overlay if video_out has independent video and OSD resolutions */
+ && event->object.overlay
+ && ( event->object.overlay->extent_width <= 0 ||
+ event->object.overlay->extent_height <= 0)
#endif
- if (event->event_type == OVERLAY_EVENT_SHOW) {
+ ) {
switch (event->object.object_type) {
case 0:
/* regular subtitle */