summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-11-24 15:44:15 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-11-24 15:44:15 +0000
commit4bb9c106a8a8a0a2725dfb21c7bc42a16474f4a8 (patch)
treee41629d0661250dcae0709a1dd65931485e3cc64
parenta018b6e299974b37fcae31ca106cb19ed9f71b4a (diff)
downloadxine-lib-4bb9c106a8a8a0a2725dfb21c7bc42a16474f4a8.tar.gz
xine-lib-4bb9c106a8a8a0a2725dfb21c7bc42a16474f4a8.tar.bz2
the ratio_code in xine_get_current_frame() is wrong, since we changed the
internal value to float; patch inspired by Reinhard Nissl CVS patchset: 7154 CVS date: 2004/11/24 15:44:15
-rw-r--r--src/xine-engine/xine.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 71cda057d..6cc24cf3d 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.302 2004/11/17 01:38:41 miguelfreitas Exp $
+ * $Id: xine.c,v 1.303 2004/11/24 15:44:15 mroi Exp $
*/
/*
@@ -1716,7 +1716,18 @@ int xine_get_current_frame (xine_stream_t *stream, int *width, int *height,
*width = frame->width;
*height = frame->height;
- *ratio_code = frame->ratio;
+ *ratio_code = 10000.0 * frame->ratio;
+ /* make ratio_code backward compatible */
+#define RATIO_LIKE(a, b) ((b) - 1 <= (a) && (a) <= 1 + (b))
+ if (RATIO_LIKE(*ratio_code, 10000))
+ *ratio_code = XINE_VO_ASPECT_SQUARE;
+ else if (RATIO_LIKE(*ratio_code, 13333))
+ *ratio_code = XINE_VO_ASPECT_4_3;
+ else if (RATIO_LIKE(*ratio_code, 17778))
+ *ratio_code = XINE_VO_ASPECT_ANAMORPHIC;
+ else if (RATIO_LIKE(*ratio_code, 21100))
+ *ratio_code = XINE_VO_ASPECT_DVB;
+
*format = frame->format;
if (img){