--- /tmp/gst-plugins-bad-1.4.1/ext/assrender/gstassrender.c	2014-08-12 09:51:07.000000000 +0200
+++ gstassrender.c	2014-11-06 09:14:58.239413133 +0100
@@ -742,9 +742,15 @@
     src_skip = ass_image->stride - w;
     dst_skip = stride - w * 4;
 
+//     printf("\nalpha=%i, r=%i, g=%i, b=%i", alpha, r, g, b);
+
     for (y = 0; y < h; y++) {
+// 	printf("\n");
       for (x = 0; x < w; x++) {
         k = src[0] * alpha / 255;
+// 	printf("%02x",k);
+// 	printf("%02x",src[0]);
+//  	printf("%02x%02x%02x%02x",dst[0],dst[1],dst[2],dst[3]);
         if (dst[3] == 0) {
           dst[3] = k;
           dst[2] = (k * r) / 255;
@@ -756,6 +762,7 @@
           dst[1] = (k * g + (255 - k) * dst[1]) / 255;
           dst[0] = (k * b + (255 - k) * dst[0]) / 255;
         }
+// 	printf("%02x%02x%02x%02x ",dst[0],dst[1],dst[2],dst[3]);
         src++;
         dst += 4;
       }
@@ -1215,6 +1222,12 @@
         render->composition = NULL;
       }
 
+GstMapInfo map;
+gst_buffer_map(buffer, &map, GST_MAP_READ);
+GST_INFO_OBJECT (buffer, "pre composition data@%p refcount=%i", map.data, GST_OBJECT_REFCOUNT_VALUE(buffer));
+gst_buffer_unmap(buffer, &map);
+
+
       if (ass_image != NULL) {
         if (!render->composition)
           render->composition = gst_ass_render_composite_overlay (render,
@@ -1222,6 +1235,11 @@
 
         if (render->composition) {
           buffer = gst_buffer_make_writable (buffer);
+
+gst_buffer_map(buffer, &map, GST_MAP_READ);
+GST_INFO_OBJECT (buffer, "buffer made writeable data@%p refcount=%i", map.data, GST_OBJECT_REFCOUNT_VALUE(buffer));
+gst_buffer_unmap(buffer, &map);
+
           if (render->attach_compo_to_buffer) {
             gst_buffer_add_video_overlay_composition_meta (buffer,
                 render->composition);
@@ -1229,7 +1247,13 @@
             GstVideoFrame frame;
 
             gst_video_frame_map (&frame, &render->info, buffer, GST_MAP_WRITE);
+gst_buffer_map(buffer, &map, GST_MAP_READ);
+GST_INFO_OBJECT (buffer, "gst_video_frame_mapped data@%p refcount=%i", map.data, GST_OBJECT_REFCOUNT_VALUE(buffer));
+gst_buffer_unmap(buffer, &map);
             gst_video_overlay_composition_blend (render->composition, &frame);
+gst_buffer_map(buffer, &map, GST_MAP_READ);
+GST_INFO_OBJECT (buffer, "gst_video_overlay_composition_blended data@%p refcount=%i", map.data, GST_OBJECT_REFCOUNT_VALUE(buffer));
+gst_buffer_unmap(buffer, &map);
             gst_video_frame_unmap (&frame);
           }
         }
@@ -1238,6 +1262,9 @@
       }
 
       /* Push the video frame */
+gst_buffer_map(buffer, &map, GST_MAP_READ);
+GST_INFO_OBJECT (buffer, "buffer pre push data@%p refcount=%i", map.data, GST_OBJECT_REFCOUNT_VALUE(buffer));
+gst_buffer_unmap(buffer, &map);
       ret = gst_pad_push (render->srcpad, buffer);
 
       if (text_running_time_end <= vid_running_time_end) {
