diff --git a/common b/common
index 6ab11d1..f8b3d91 160000
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 6ab11d17cb8e4d1ed755da7accac9630d567a097
+Subproject commit f8b3d9167a75c5acb514d43173d8d29d413a6e9c
diff --git a/gst/dvdsub/gstdvdsubdec.c b/gst/dvdsub/gstdvdsubdec.c
index 0c67ff6..724eb95 100644
--- a/gst/dvdsub/gstdvdsubdec.c
+++ b/gst/dvdsub/gstdvdsubdec.c
@@ -40,6 +40,7 @@ static void gst_setup_palette (GstDvdSubDec * dec);
 static void gst_dvd_sub_dec_merge_title (GstDvdSubDec * dec, GstBuffer * buf);
 static GstClockTime gst_dvd_sub_dec_get_event_delay (GstDvdSubDec * dec);
 static gboolean gst_dvd_sub_dec_sink_event (GstPad * pad, GstEvent * event);
+static gboolean gst_dvd_sub_dec_sink_setcaps (GstPad * pad, GstCaps * caps);
 
 static GstFlowReturn gst_send_subtitle_frame (GstDvdSubDec * dec,
     GstClockTime end_ts);
@@ -48,7 +49,12 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("video/x-raw-yuv, format = (fourcc) AYUV, "
-        "width = (int) 720, height = (int) 576, framerate = (fraction) 0/1")
+        "width = (int) 720, height = (int) 576, framerate = (fraction) 0/1; "
+        "video/x-raw-rgb, format = (fourcc) ARGB, "
+        "width = (int) 720, height = (int) 576, framerate = (fraction) 0/1, "
+        "bpp = (int) 32, endianness = (int) 4321, red_mask = (int) 16711680, "
+        "green_mask = (int) 65280, blue_mask = (int) 255, "
+        " alpha_mask = (int) -16777216, depth = (int) 32")
     );
 
 static GstStaticPadTemplate subtitle_template = GST_STATIC_PAD_TEMPLATE ("sink",
@@ -131,13 +137,14 @@ gst_dvd_sub_dec_init (GstDvdSubDec * dec, GstDvdSubDecClass * klass)
   gst_pad_set_event_function (dec->sinkpad,
       GST_DEBUG_FUNCPTR (gst_dvd_sub_dec_sink_event));
   gst_element_add_pad (GST_ELEMENT (dec), dec->sinkpad);
+  gst_pad_set_setcaps_function (dec->sinkpad, gst_dvd_sub_dec_sink_setcaps);
 
   tmpl = gst_static_pad_template_get (&src_template);
   dec->srcpad = gst_pad_new_from_template (tmpl, "src");
   gst_pad_set_event_function (dec->srcpad,
       GST_DEBUG_FUNCPTR (gst_dvd_sub_dec_src_event));
   gst_pad_use_fixed_caps (dec->srcpad);
-  gst_pad_set_caps (dec->srcpad, gst_pad_template_get_caps (tmpl));
+//  gst_pad_set_caps (dec->srcpad, gst_pad_template_get_caps (tmpl));
   gst_object_unref (tmpl);
   gst_element_add_pad (GST_ELEMENT (dec), dec->srcpad);
 
@@ -164,6 +171,7 @@ gst_dvd_sub_dec_init (GstDvdSubDec * dec, GstDvdSubDecClass * klass)
 
   dec->out_buffer = NULL;
   dec->buf_dirty = TRUE;
+  dec->use_ARGB = FALSE;
 }
 
 static void
@@ -408,6 +416,18 @@ gst_get_nibble (guchar * buffer, RLE_state * state)
   }
 }
 
+/* clips between 0 -255 */
+guchar inline clip (gint a)
+{   
+  if (a > 255 ) {
+    return 255;     
+  }              
+  else if (a < 0) {
+    return 0;
+  }
+  return (guchar) a;  
+}     
+
 /* Premultiply the current lookup table into the "target" cache */
 static void
 gst_setup_palette (GstDvdSubDec * dec)
@@ -429,6 +449,26 @@ gst_setup_palette (GstDvdSubDec * dec)
     target2->V = (col >> 8) & 0xff;
     target2->U = col & 0xff;
     target2->A = dec->menu_alpha[i] * 0xff / 0xf;
+
+    /* If ARGB flag set, then convert YUV palette to RGB */
+    /* Using integer aritmetic */  
+    if (dec->use_ARGB) {
+      guchar C = target->Y - 16;
+      guchar D = target->U - 128;
+      guchar E = target->V - 128;
+
+      target->R = clip ((298 * C + 409 * E + 128) >> 8);
+      target->G = clip ((298 * C - 100 * D - 128 * E + 128) >> 8);
+      target->B = clip ((298 * C + 516 * D + 128) >> 8);
+
+      C = target2->Y - 16;
+      D = target2->U - 128;
+      E = target2->V - 128;
+
+      target2->R = clip ((298 * C + 409 * E + 128) >> 8);
+      target2->G = clip ((298 * C - 100 * D - 128 * E + 128) >> 8);
+      target2->B = clip ((298 * C + 516 * D + 128) >> 8);
+    }
   }
 }
 
@@ -450,15 +490,26 @@ gst_get_rle_code (guchar * buffer, RLE_state * state)
   return code;
 }
 
-#define DRAW_RUN(target,len,c)                  \
+/* Based on the ARGB flag either use YUV or RGB palette data */
+#define DRAW_RUN(target,len,c,use_ARGB)        \
 G_STMT_START {                                  \
   if ((c)->A) {                                 \
     gint i;                                     \
-    for (i = 0; i < (len); i++) {               \
-      *(target)++ = (c)->A;                     \
-      *(target)++ = (c)->Y;                     \
-      *(target)++ = (c)->U;                     \
-      *(target)++ = (c)->V;                     \
+    if (!use_ARGB) {                            \
+      for (i = 0; i < (len); i++) {             \
+        *(target)++ = (c)->A;                   \
+        *(target)++ = (c)->Y;                   \
+        *(target)++ = (c)->U;                   \
+        *(target)++ = (c)->V;                   \
+      }                                         \
+    }                                           \
+    else {                                      \
+      for (i = 0; i < (len); i++) {             \
+        *(target)++ = (c)->A;                   \
+        *(target)++ = (c)->R;                   \
+        *(target)++ = (c)->G;                   \
+        *(target)++ = (c)->B;                   \
+      }                                         \
     }                                           \
   } else {                                      \
     (target) += 4 * (len);                      \
@@ -506,7 +557,7 @@ gst_draw_rle_line (GstDvdSubDec * dec, guchar * buffer, RLE_state * state)
       if (x <= state->hl_left) {
         run = MIN (length, state->hl_left - x + 1);
 
-        DRAW_RUN (target, run, colour_entry);
+        DRAW_RUN (target, run, colour_entry, dec->use_ARGB);
         length -= run;
         x += run;
       }
@@ -517,7 +568,7 @@ gst_draw_rle_line (GstDvdSubDec * dec, guchar * buffer, RLE_state * state)
 
         run = MIN (length, state->hl_right - x + 1);
 
-        DRAW_RUN (target, run, hl_colour);
+        DRAW_RUN (target, run, hl_colour, dec->use_ARGB);
         length -= run;
         x += run;
       }
@@ -525,7 +576,7 @@ gst_draw_rle_line (GstDvdSubDec * dec, guchar * buffer, RLE_state * state)
 
     /* Draw the rest of the run */
     if (length > 0) {
-      DRAW_RUN (target, length, colour_entry);
+      DRAW_RUN (target, length, colour_entry, dec->use_ARGB);
       x += length;
     }
   }
@@ -635,9 +686,16 @@ gst_send_subtitle_frame (GstDvdSubDec * dec, GstClockTime end_ts)
 
       for (x = 0; x < dec->in_width; x++) {
         line[0] = 0;            /* A */
-        line[1] = 16;           /* Y */
-        line[2] = 128;          /* U */
-        line[3] = 128;          /* V */
+        if (!dec->use_ARGB) {  
+          line[1] = 16;           /* Y */
+          line[2] = 128;          /* U */
+          line[3] = 128;          /* V */
+        }
+        else {
+          line[1] = 128;          /* R */
+          line[2] = 128;          /* G */
+          line[3] = 128;          /* B */
+        }
 
         line += 4;
       }
@@ -788,6 +846,87 @@ gst_dvd_sub_dec_chain (GstPad * pad, GstBuffer * buf)
 
   return ret;
 }
+static gboolean
+gst_dvd_sub_dec_sink_setcaps (GstPad * pad, GstCaps * caps)
+{
+  GstDvdSubDec *dec = GST_DVD_SUB_DEC (gst_pad_get_parent (pad));
+  gboolean ret = FALSE;
+  guint32 fourcc = GST_MAKE_FOURCC ('A', 'Y', 'U', 'V');
+  GstCaps * out_caps = NULL, * peer_caps = NULL;
+
+  GST_DEBUG_OBJECT (dec, "setcaps called with %" GST_PTR_FORMAT, caps);
+
+  dec->out_fourcc = fourcc;
+  out_caps = gst_caps_new_simple ("video/x-raw-yuv",
+      "width", G_TYPE_INT, dec->in_width,
+      "height", G_TYPE_INT, dec->in_height,
+      "format", GST_TYPE_FOURCC, dec->out_fourcc,
+      "framerate", GST_TYPE_FRACTION, 0, 1,
+      NULL);
+
+  peer_caps = gst_pad_get_allowed_caps (dec->srcpad);
+  if (G_LIKELY (peer_caps)) {
+    guint i = 0, n = 0;
+    gst_pad_fixate_caps (dec->srcpad, peer_caps);
+
+    n = gst_caps_get_size (peer_caps);
+    GST_DEBUG_OBJECT (dec, "peer allowed caps (%u structure(s)) are %" \
+        GST_PTR_FORMAT, n, peer_caps);
+
+    for (i = 0; i < n; i++) {
+      GstStructure * s = gst_caps_get_structure (peer_caps, i);
+      gst_structure_get_fourcc (s, "format", &fourcc);
+      /* Check if the peer pad support ARGB format, if yes change caps */
+      if (fourcc == GST_MAKE_FOURCC ('A', 'R', 'G', 'B')) {
+        gst_caps_unref (out_caps);
+        GST_DEBUG_OBJECT (dec, "trying with fourcc %" GST_FOURCC_FORMAT,
+            GST_FOURCC_ARGS (fourcc));
+        out_caps = gst_caps_new_simple ("video/x-raw-rgb",
+            "width", G_TYPE_INT, dec->in_width,
+            "height", G_TYPE_INT, dec->in_height,
+            "format", GST_TYPE_FOURCC, fourcc,
+            "framerate", GST_TYPE_FRACTION, 0, 1,
+            "bpp", G_TYPE_INT, 32,
+            "depth", G_TYPE_INT, 32,
+            "red_mask", G_TYPE_INT, 16711680,
+            "green_mask", G_TYPE_INT, 65280,
+            "blue_mask", G_TYPE_INT, 255,
+            "alpha_mask", G_TYPE_INT, -16777216,
+            "endianness", G_TYPE_INT, G_BIG_ENDIAN,
+            NULL);
+        if (gst_pad_peer_accept_caps (dec->srcpad, out_caps)) {
+            GST_DEBUG_OBJECT (dec, "peer accepted format %" GST_FOURCC_FORMAT,
+                GST_FOURCC_ARGS (fourcc));
+          break;
+        }
+      }
+    }
+    gst_caps_unref (peer_caps);
+  }
+  GST_DEBUG_OBJECT (dec, "setting caps downstream to %" GST_PTR_FORMAT,
+      out_caps);
+  if (gst_pad_set_caps (dec->srcpad, out_caps)) {
+    dec->out_fourcc = fourcc;
+  }
+  else {
+    GST_WARNING_OBJECT (dec, "failed setting downstream caps");
+    gst_caps_unref (out_caps);
+    goto beach;
+  }
+
+  gst_caps_unref (out_caps);
+  /* If ARGB format then set the flag */
+  switch (dec->out_fourcc) {
+    case GST_MAKE_FOURCC ('A', 'R', 'G', 'B'):
+      dec->use_ARGB = TRUE;
+  }
+
+  ret = TRUE;
+
+beach:
+  gst_object_unref (dec);
+  return ret;
+}
 
 static gboolean
 gst_dvd_sub_dec_sink_event (GstPad * pad, GstEvent * event)
diff --git a/gst/dvdsub/gstdvdsubdec.h b/gst/dvdsub/gstdvdsubdec.h
index 0d12566..11cb6d5 100644
--- a/gst/dvdsub/gstdvdsubdec.h
+++ b/gst/dvdsub/gstdvdsubdec.h
@@ -36,6 +36,10 @@ typedef struct YUVA_val
   guchar U;
   guchar V;
   guchar A;
+
+  guchar R;
+  guchar G;
+  guchar B;
 } YUVA_val;
 
 struct _GstDvdSubDec
@@ -60,6 +64,8 @@ struct _GstDvdSubDec
   YUVA_val palette_cache[4];
   YUVA_val hl_palette_cache[4];
 
+  gboolean use_ARGB;
+  guint32 out_fourcc;
   GstClockTime next_ts;
 
   /*
