assrender: Improve debug output a bit and simplify code
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 14 Jan 2010 11:59:21 +0000 (12:59 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 14 Jan 2010 11:59:21 +0000 (12:59 +0100)
ext/assrender/gstassrender.c

index 1845f8b..b0d38a4 100644 (file)
@@ -1018,14 +1018,14 @@ gst_ass_render_chain_video (GstPad * pad, GstBuffer * buffer)
     ass_image = ass_render_frame (render->ass_renderer, render->ass_track,
         timestamp, NULL);
 
-    if (ass_image == NULL) {
+    if (ass_image != NULL) {
+      buffer = gst_buffer_make_writable (buffer);
+      render->blit (render, ass_image, buffer);
+    } else {
       GST_LOG_OBJECT (render, "nothing to render right now");
-      ret = gst_pad_push (render->srcpad, buffer);
-      return ret;
     }
-
-    buffer = gst_buffer_make_writable (buffer);
-    render->blit (render, ass_image, buffer);
+  } else {
+    GST_LOG_OBJECT (render, "rendering disabled, doing buffer passthrough");
   }
 
   ret = gst_pad_push (render->srcpad, buffer);