--- libass-0.9.6.orig/debian/libass3.symbols
+++ libass-0.9.6/debian/libass3.symbols
@@ -0,0 +1,89 @@
+libass.so.3 libass3 #MINVER#
+ ass_add_font@Base 0.9.6-1
+ ass_alloc_event@Base 0.9.6-1
+ ass_alloc_style@Base 0.9.6-1
+ ass_bitmap_cache_done@Base 0.9.6-1
+ ass_bitmap_cache_init@Base 0.9.6-1
+ ass_bitmap_cache_reset@Base 0.9.6-1
+ ass_clear_fonts@Base 0.9.6-1
+ ass_composite_cache_done@Base 0.9.6-1
+ ass_composite_cache_init@Base 0.9.6-1
+ ass_composite_cache_reset@Base 0.9.6-1
+ ass_detect_change@Base 0.9.6-1
+ ass_font_cache_add@Base 0.9.6-1
+ ass_font_cache_done@Base 0.9.6-1
+ ass_font_cache_find@Base 0.9.6-1
+ ass_font_cache_init@Base 0.9.6-1
+ ass_font_free@Base 0.9.6-1
+ ass_font_get_asc_desc@Base 0.9.6-1
+ ass_font_get_glyph@Base 0.9.6-1
+ ass_font_get_kerning@Base 0.9.6-1
+ ass_font_new@Base 0.9.6-1
+ ass_font_set_size@Base 0.9.6-1
+ ass_font_set_transform@Base 0.9.6-1
+ ass_free_bitmap@Base 0.9.6-1
+ ass_free_event@Base 0.9.6-1
+ ass_free_images@Base 0.9.6-1
+ ass_free_style@Base 0.9.6-1
+ ass_free_track@Base 0.9.6-1
+ ass_glyph_cache_done@Base 0.9.6-1
+ ass_glyph_cache_init@Base 0.9.6-1
+ ass_glyph_cache_reset@Base 0.9.6-1
+ ass_image_compare@Base 0.9.6-1
+ ass_library_done@Base 0.9.6-1
+ ass_library_init@Base 0.9.6-1
+ ass_new_track@Base 0.9.6-1
+ ass_process_chunk@Base 0.9.6-1
+ ass_process_codec_private@Base 0.9.6-1
+ ass_process_data@Base 0.9.6-1
+ ass_read_file@Base 0.9.6-1
+ ass_read_memory@Base 0.9.6-1
+ ass_read_styles@Base 0.9.6-1
+ ass_render_frame@Base 0.9.6-1
+ ass_renderer_done@Base 0.9.6-1
+ ass_renderer_init@Base 0.9.6-1
+ ass_set_aspect_ratio@Base 0.9.6-1
+ ass_set_extract_fonts@Base 0.9.6-1
+ ass_set_font_scale@Base 0.9.6-1
+ ass_set_fonts@Base 0.9.6-1
+ ass_set_fonts_dir@Base 0.9.6-1
+ ass_set_fonts_nofc@Base 0.9.6-1
+ ass_set_frame_size@Base 0.9.6-1
+ ass_set_hinting@Base 0.9.6-1
+ ass_set_line_spacing@Base 0.9.6-1
+ ass_set_margins@Base 0.9.6-1
+ ass_set_style_overrides@Base 0.9.6-1
+ ass_set_use_margins@Base 0.9.6-1
+ ass_step_sub@Base 0.9.6-1
+ ass_synth_done@Base 0.9.6-1
+ ass_synth_init@Base 0.9.6-1
+ bitmap_cache@Base 0.9.6-1
+ blur@Base 0.9.6-1
+ cache_add_bitmap@Base 0.9.6-1
+ cache_add_composite@Base 0.9.6-1
+ cache_add_glyph@Base 0.9.6-1
+ cache_find_bitmap@Base 0.9.6-1
+ cache_find_composite@Base 0.9.6-1
+ cache_find_glyph@Base 0.9.6-1
+ composite_cache@Base 0.9.6-1
+ font_cache@Base 0.9.6-1
+ fontconfig_done@Base 0.9.6-1
+ fontconfig_init@Base 0.9.6-1
+ fontconfig_select@Base 0.9.6-1
+ glyph_cache@Base 0.9.6-1
+ glyph_to_bitmap@Base 0.9.6-1
+ guess_buffer_cp@Base 0.9.6-1
+ hashmap_done@Base 0.9.6-1
+ hashmap_find@Base 0.9.6-1
+ hashmap_init@Base 0.9.6-1
+ hashmap_insert@Base 0.9.6-1
+ my_mp_msg@Base 0.9.6-1
+ mystrtod@Base 0.9.6-1
+ mystrtoi@Base 0.9.6-1
+ mystrtoll@Base 0.9.6-1
+ mystrtou32@Base 0.9.6-1
+ parse_bool@Base 0.9.6-1
+ process_force_style@Base 0.9.6-1
+ read_file_recode@Base 0.9.6-1
+ strtocolor@Base 0.9.6-1
+ utf8_get_char@Base 0.9.6-1
--- libass-0.9.6.orig/debian/watch
+++ libass-0.9.6/debian/watch
@@ -0,0 +1,6 @@
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+http://sf.net/libass/libass-(.*)\.tar\.gz
--- libass-0.9.6.orig/debian/libass-dev.install
+++ libass-0.9.6/debian/libass-dev.install
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/lib*.a
+usr/lib/lib*.so
+usr/lib/pkgconfig/*
--- libass-0.9.6.orig/debian/compat
+++ libass-0.9.6/debian/compat
@@ -0,0 +1 @@
+7
--- libass-0.9.6.orig/debian/gbp.conf
+++ libass-0.9.6/debian/gbp.conf
@@ -0,0 +1,12 @@
+[DEFAULT]
+# the default build command
+#builder=debuild -i\.git -I.git
+# the default branch for upstream sources
+#upstream-branch=upstream
+# the default branch for the debian patch
+#debian-branch=master
+#versioning conventions (defaults)
+#upstream-tag = upstream/%(version)s
+#debian-tag = debian/%(version)s
+# use pristine tar
+pristine-tar = True
--- libass-0.9.6.orig/debian/changelog
+++ libass-0.9.6/debian/changelog
@@ -0,0 +1,36 @@
+libass (0.9.6-1~bpo50+1) lenny-backports; urgency=low
+
+  * Rebuild for lenny.
+  * Add myself as an uploader.
+
+ -- Andres Salomon <dilinger@debian.org>  Sat, 10 Oct 2009 00:28:55 +0000
+
+libass (0.9.6-1) unstable; urgency=low
+
+  * New Upstream Version 0.9.6
+    (Closes: #514311, #519578, #519607)
+    + SONAME bump
+    + Patch as been merged upstream
+  * Don't use dh_clean -k
+  * Use --enable-maintainer-mode
+  * Policy version 3.8.1
+  * Remove autotolls-dev from build-dep
+  * Point to the good version of the GPL
+  * Add a symbols file
+  * Add a configuration file for git-buildpackage
+  * Vcs-*: Reflect the move to git
+
+ -- Christophe Mutricy <xtophe@videolan.org>  Thu, 26 Mar 2009 20:59:14 +0100
+
+libass (0.9.5-2) unstable; urgency=low
+
+  * Don't install .la files 
+
+ -- Christophe Mutricy <xtophe@videolan.org>  Thu, 06 Nov 2008 21:55:46 +0100
+
+libass (0.9.5-1) unstable; urgency=low
+
+  * Initial release (Closes: #496560)
+
+ -- Christophe Mutricy <xtophe@videolan.org>  Mon, 25 Aug 2008 17:17:14 +0100
+
--- libass-0.9.6.orig/debian/libass-dev.dirs
+++ libass-0.9.6/debian/libass-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
--- libass-0.9.6.orig/debian/libass3.install
+++ libass-0.9.6/debian/libass3.install
@@ -0,0 +1 @@
+usr/lib/lib*.so.*
--- libass-0.9.6.orig/debian/libass3.dirs
+++ libass-0.9.6/debian/libass3.dirs
@@ -0,0 +1 @@
+usr/lib
--- libass-0.9.6.orig/debian/rules
+++ libass-0.9.6/debian/rules
@@ -0,0 +1,74 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/quilt/quilt.make
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+else
+CROSS= --build $(DEB_BUILD_GNU_TYPE)
+endif
+
+CONFFLAGS = $(CROSS) 
+CONFFLAGS += --prefix=/usr --mandir=\$${prefix}/share/man 
+CONFFLAGS += --infodir=\$${prefix}/share/info 
+CONFFLAGS += --enable-maintainer-mode
+CONFFLAGS += CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" LIBS="-lm"
+
+config.status: $(QUILT_STAMPFN) configure
+	dh_testdir
+	./configure $(CONFFLAGS)
+
+build: build-stamp
+build-stamp:  config.status 
+	dh_testdir
+	$(MAKE)
+	touch $@
+
+clean: unpatch clean-real
+clean-real:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp 
+	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -rf .pc 
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep 
+	dh_installdirs
+	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+binary-indep: build install
+# We have nothing to do
+
+# Build architecture-dependent files
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs Changelog
+	dh_installdocs
+	dh_install
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- libass-0.9.6.orig/debian/copyright
+++ libass-0.9.6/debian/copyright
@@ -0,0 +1,34 @@
+This package was debianized by Christophe Mutricy <xtophe@videolan.org> on
+Mon, 25 Aug 2008 17:17:14 +0100.
+
+It was downloaded from <http://sourceforge.net/projects/libass>
+
+Upstream Author:
+
+  Evgeniy Stepanov <eugeni.stepanov@gmail.com
+
+Copyright:
+   
+   Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
+
+License:
+
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
+
+The Debian packaging is (C) 2008, Christophe Mutricy <xtophe@videolan.org> and
+is licensed under the GPL, see above.
--- libass-0.9.6.orig/debian/control
+++ libass-0.9.6/debian/control
@@ -0,0 +1,36 @@
+Source: libass
+Priority: extra
+Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
+Uploaders: Christophe Mutricy <xtophe@videolan.org>
+Build-Depends: debhelper (>= 7), 
+               quilt,
+               libfreetype6-dev,
+               libenca-dev,
+               libfontconfig1-dev,
+               libpng12-dev
+Standards-Version: 3.8.1
+Section: libs
+Homepage: http://sourceforge.net/projects/libass
+Vcs-Git: git://git.debian.org/git/pkg-multimedia/libass.git
+Vcs-Browser: http://git.debian.org/?p=pkg-multimedia/libass.git
+
+Package: libass-dev
+Section: libdevel
+Architecture: any
+Depends: libass3 (= ${binary:Version})
+Description: development files for libass
+ SubStation Alpha (SSA) is a subtitle file format that allows more
+ advanced subtitles than the conventional SRT and similar formats.
+ .
+ This package contains the header files and static libraries needed to compile
+ applications or shared objects that use libass.
+
+Package: libass3
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: library for SSA/ASS subtitles rendering
+ SubStation Alpha (SSA) is a subtitle file format that allows more
+ advanced subtitles than the conventional SRT and similar formats.
+ .
+ This package contains the shared library for libass.
--- libass-0.9.6.orig/debian/README.source
+++ libass-0.9.6/debian/README.source
@@ -0,0 +1,5 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+See /usr/share/doc/quilt/README.source for details how to use quilt.
--- libass-0.9.6.orig/debian/patches/001-mplayer-updates.diff
+++ libass-0.9.6/debian/patches/001-mplayer-updates.diff
@@ -0,0 +1,276 @@
+This is a collection of commits taken from 
+svn://svn.mplayerhq.hu/mplayer/trunk/libass
+
+diff -ruN libass-0.9.5/libass/ass.c libass-0.9.5-patched/libass/ass.c
+--- libass/libass/ass.c	2008-05-22 20:01:18.000000000 +0200
++++ libass-0.9.5-patched/libass/ass.c	2008-08-08 23:59:21.000000000 +0200
+@@ -846,16 +846,22 @@
+ 		char* ip;
+ 		char* op;
+ 		size_t rc;
++                int clear = 0;
+ 		
+-		outbuf = malloc(size);
++		outbuf = malloc(osize);
+ 		ip = data;
+ 		op = outbuf;
+ 		
+-		while (ileft) {
++		while (1) {
++                        if(ileft)
+ 			rc = iconv(icdsc, &ip, &ileft, &op, &oleft);
++                        else {// clear the conversion state and leave
++                            clear = 1;
++                            rc = iconv(icdsc, NULL, NULL, &op, &oleft);
++                        }
+ 			if (rc == (size_t)(-1)) {
+ 				if (errno == E2BIG) {
+-					int offset = op - outbuf;
++					size_t offset = op - outbuf;
+ 					outbuf = (char*)realloc(outbuf, osize + size);
+ 					op = outbuf + offset;
+ 					osize += size;
+@@ -864,7 +870,9 @@
+ 					mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorRecodingFile);
+ 					return NULL;
+ 				}
+-			}
++			} else
++                            if( clear )
++                                break;
+ 		}
+ 		outbuf[osize - oleft - 1] = 0;
+ 	}
+diff -ruN libass-0.9.5/libass/ass_bitmap.c libass-0.9.5-patched/libass/ass_bitmap.c
+--- libass/libass/ass_bitmap.c	2008-05-22 20:01:18.000000000 +0200
++++ libass-0.9.5-patched/libass/ass_bitmap.c	2008-08-09 00:04:36.000000000 +0200
+@@ -274,9 +274,10 @@
+ 	resize_tmp(priv, (*bm_g)->w, (*bm_g)->h);
+ 	
+ 	if (be) {
+-		blur((*bm_g)->buffer, priv->tmp, (*bm_g)->w, (*bm_g)->h, (*bm_g)->w, (int*)priv->gt2, priv->g_r, priv->g_w);
+ 		if (*bm_o)
+ 			blur((*bm_o)->buffer, priv->tmp, (*bm_o)->w, (*bm_o)->h, (*bm_o)->w, (int*)priv->gt2, priv->g_r, priv->g_w);
++		else
++			blur((*bm_g)->buffer, priv->tmp, (*bm_g)->w, (*bm_g)->h, (*bm_g)->w, (int*)priv->gt2, priv->g_r, priv->g_w);
+ 	}
+ 
+ 	if (*bm_o)
+diff -ruN libass-0.9.5/libass/ass_fontconfig.c libass-0.9.5-patched/libass/ass_fontconfig.c
+--- libass/libass/ass_fontconfig.c	2008-05-22 20:01:18.000000000 +0200
++++ libass-0.9.5-patched/libass/ass_fontconfig.c	2008-08-08 23:59:21.000000000 +0200
+@@ -129,6 +129,8 @@
+ 		goto error;
+ 
+ 	fset = FcFontSort(priv->config, pat, FcTrue, NULL, &result);
++        if(!fset)
++            goto error;
+ 
+ 	for (curf = 0; curf < fset->nfont; ++curf) {
+ 		FcPattern* curp = fset->fonts[curf];
+@@ -351,12 +353,15 @@
+ 	FcPattern* pattern;
+ 	FcFontSet* fset;
+ 	FcBool res;
++        int face_index, num_faces = 1;
+ 
+-	rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, 0, &face);
++	for (face_index = 0; face_index < num_faces; ++face_index) {
++        rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, 0, &face);
+ 	if (rc) {
+ 		mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorOpeningMemoryFont, name);
+ 		return;
+ 	}
++        num_faces = face->num_faces;
+ 
+ 	pattern = FcFreeTypeQueryFace(face, (unsigned char*)name, 0, FcConfigGetBlanks(priv->config));
+ 	if (!pattern) {
+@@ -380,6 +385,7 @@
+ 	}
+ 
+ 	FT_Done_Face(face);
++        }
+ #endif
+ }
+ 
+@@ -419,7 +425,8 @@
+ 	for (i = 0; i < library->num_fontdata; ++i)
+ 		process_fontdata(priv, library, ftlibrary, i);
+ 
+-	if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse)
++	if(dir) {
++        if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse)
+ 	{
+ 		mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_UpdatingFontCache);
+ 		if (FcGetVersion() >= 20390 && FcGetVersion() < 20400)
+@@ -457,6 +464,7 @@
+ 	if (!rc) {
+ 		mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcConfigAppFontAddDirFailed);
+ 	}
++        }
+ 
+ 	priv->family_default = family ? strdup(family) : 0;
+ 	priv->path_default = path ? strdup(path) : 0;
+diff -ruN libass-0.9.5/libass/ass_render.c libass-0.9.5-patched/libass/ass_render.c
+--- libass/libass/ass_render.c	2008-05-22 20:01:18.000000000 +0200
++++ libass-0.9.5-patched/libass/ass_render.c	2008-08-09 00:04:28.000000000 +0200
+@@ -149,8 +149,8 @@
+ 		EVENT_HSCROLL, // "Banner" transition effect, text_width is unlimited
+ 		EVENT_VSCROLL // "Scroll up", "Scroll down" transition effects
+ 		} evt_type;
+-	int pos_x, pos_y; // position
+-	int org_x, org_y; // origin
++	double pos_x, pos_y; // position
++	double org_x, org_y; // origin
+ 	char have_origin; // origin is explicitly defined; if 0, get_base_point() is used
+ 	double scale_x, scale_y;
+ 	double hspacing; // distance between letters, in pixels
+@@ -161,6 +161,7 @@
+ 	uint32_t fade; // alpha from \fad
+ 	char be; // blur edges
+ 	int shadow;
++	int drawing_mode; // not implemented; when != 0 text is discarded, except for style override tags
+ 
+ 	effect_t effect_type;
+ 	int effect_timing;
+@@ -456,19 +457,19 @@
+ /**
+  * \brief Mapping between script and screen coordinates
+  */
+-static int x2scr(int x) {
++static int x2scr(double x) {
+ 	return x*frame_context.orig_width_nocrop / frame_context.track->PlayResX +
+ 		FFMAX(global_settings->left_margin, 0);
+ }
+ /**
+  * \brief Mapping between script and screen coordinates
+  */
+-static int y2scr(int y) {
++static int y2scr(double y) {
+ 	return y * frame_context.orig_height_nocrop / frame_context.track->PlayResY +
+ 		FFMAX(global_settings->top_margin, 0);
+ }
+ // the same for toptitles
+-static int y2scr_top(int y) {
++static int y2scr_top(double y) {
+ 	if (global_settings->use_margins)
+ 		return y * frame_context.orig_height_nocrop / frame_context.track->PlayResY;
+ 	else
+@@ -476,7 +477,7 @@
+ 			FFMAX(global_settings->top_margin, 0);
+ }
+ // the same for subtitles
+-static int y2scr_sub(int y) {
++static int y2scr_sub(double y) {
+ 	if (global_settings->use_margins)
+ 		return y * frame_context.orig_height_nocrop / frame_context.track->PlayResY +
+ 			FFMAX(global_settings->top_margin, 0) +
+@@ -679,11 +680,11 @@
+  * \param pwr multiplier for some tag effects (comes from \t tags)
+  */
+ static char* parse_tag(char* p, double pwr) {
+-#define skip_all(x) if (*p == (x)) ++p; else { \
+-	while ((*p != (x)) && (*p != '}') && (*p != 0)) {++p;} }
++#define skip_to(x) while ((*p != (x)) && (*p != '}') && (*p != 0)) { ++p;}
+ #define skip(x) if (*p == (x)) ++p; else { return p; }
+ 	
+-	skip_all('\\');
++	skip_to('\\');
++	skip('\\');
+ 	if ((*p == '}') || (*p == 0))
+ 		return p;
+ 
+@@ -727,7 +728,7 @@
+ 	} else if (mystrcmp(&p, "move")) {
+ 		int x1, x2, y1, y2;
+ 		long long t1, t2, delta_t, t;
+-		int x, y;
++		double x, y;
+ 		double k;
+ 		skip('(');
+ 		x1 = strtol(p, &p, 10);
+@@ -787,7 +788,7 @@
+ 	} else if (mystrcmp(&p, "fn")) {
+ 		char* start = p;
+ 		char* family;
+-		skip_all('\\');
++		skip_to('\\');
+ 		if (p > start) {
+ 			family = malloc(p - start + 1);
+ 			strncpy(family, start, p - start);
+@@ -888,6 +889,7 @@
+ 		render_context.org_x = v1;
+ 		render_context.org_y = v2;
+ 		render_context.have_origin = 1;
++		render_context.detect_collisions = 0;
+ 	} else if (mystrcmp(&p, "t")) {
+ 		double v[3];
+ 		int v1, v2;
+@@ -928,7 +930,8 @@
+ 		}
+ 		while (*p == '\\')
+ 			p = parse_tag(p, k); // maybe k*pwr ? no, specs forbid nested \t's 
+-		skip_all(')'); // FIXME: better skip(')'), but much more tags support required
++		skip_to(')'); // in case there is some unknown tag or a comment
++		skip(')');
+ 	} else if (mystrcmp(&p, "clip")) {
+ 		int x0, y0, x1, y1;
+ 		int res = 1;
+@@ -1026,12 +1029,19 @@
+ 			render_context.shadow = val;
+ 		else
+ 			render_context.shadow = render_context.style->Shadow;
++	} else if (mystrcmp(&p, "pbo")) {
++		(void)strtol(p, &p, 10); // ignored
++	} else if (mystrcmp(&p, "p")) {
++		int val;
++		if (!mystrtoi(&p, 10, &val))
++			val = 0;
++		render_context.drawing_mode = !!val;
+ 	}
+ 
+ 	return p;
+ 
+ #undef skip
+-#undef skip_all
++#undef skip_to
+ }
+ 
+ /**
+@@ -1071,7 +1081,7 @@
+ 			p += 2;
+ 			*str = p;
+ 			return '\n';
+-		} else if (*(p+1) == 'n') {
++		} else if ((*(p+1) == 'n') || (*(p+1) == 'h')) {
+ 			p += 2;
+ 			*str = p;
+ 			return ' ';
+@@ -1201,6 +1211,7 @@
+ 	render_context.clip_y1 = frame_context.track->PlayResY;
+ 	render_context.detect_collisions = 1;
+ 	render_context.fade = 0;
++	render_context.drawing_mode = 0;
+ 	render_context.effect_type = EF_NONE;
+ 	render_context.effect_timing = 0;
+ 	render_context.effect_skip_timing = 0;
+@@ -1748,7 +1759,9 @@
+ 	while (1) {
+ 		// get next char, executing style override
+ 		// this affects render_context
+-		code = get_next_char(&p);
++		do {
++			code = get_next_char(&p);
++		} while (code && render_context.drawing_mode); // skip everything in drawing mode
+ 		
+ 		// face could have been changed in get_next_char
+ 		if (!render_context.font) {
+@@ -1934,7 +1947,7 @@
+ 	if (render_context.evt_type == EVENT_POSITIONED) {
+ 		int base_x = 0;
+ 		int base_y = 0;
+-		mp_msg(MSGT_ASS, MSGL_DBG2, "positioned event at %d, %d\n", render_context.pos_x, render_context.pos_y);
++		mp_msg(MSGT_ASS, MSGL_DBG2, "positioned event at %f, %f\n", render_context.pos_x, render_context.pos_y);
+ 		get_base_point(bbox, alignment, &base_x, &base_y);
+ 		device_x = x2scr(render_context.pos_x) - base_x;
+ 		device_y = y2scr(render_context.pos_y) - base_y;
--- libass-0.9.6.orig/debian/patches/series
+++ libass-0.9.6/debian/patches/series
@@ -0,0 +1 @@
+# Patch series for quilt
