summaryrefslogtreecommitdiff
path: root/xine_frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'xine_frontend.c')
-rw-r--r--xine_frontend.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/xine_frontend.c b/xine_frontend.c
index 785f15ef..d55de99c 100644
--- a/xine_frontend.c
+++ b/xine_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend.c,v 1.37 2007-05-18 15:09:42 phintuka Exp $
+ * $Id: xine_frontend.c,v 1.38 2007-05-18 15:49:02 phintuka Exp $
*
*/
@@ -246,6 +246,21 @@ static void fe_frame_output_cb (void *data,
if(this->cropping)
xine_set_param(this->stream, XINE_PARAM_VO_ZOOM_X, 100);
}
+
+ if(this->aspect_controller) {
+ double video_aspect = (video_pixel_aspect * (double)video_width / (double)video_height);
+ double aspect_diff = video_aspect - this->video_aspect;
+ if ((aspect_diff > 0.05) || (aspect_diff < -0.05)) {
+ char cmd[4096];
+ if(snprintf(cmd, sizeof(cmd), "%s %d",
+ this->aspect_controller, (int)(video_aspect * 10000.0))
+ < sizeof(cmd)) {
+ LOGDBG("Aspect ratio changed, executing %s", cmd);
+ system(cmd);
+ this->video_aspect = video_aspect;
+ }
+ }
+ }
}
static void xine_event_cb (void *user_data, const xine_event_t *event)