--- ext/libpng/gstpngdec.c	2013-09-24 15:05:22.000000000 +0200
+++ ext/libpng/gstpngdec.c	2014-03-12 14:32:51.860380103 +0100
@@ -183,7 +183,7 @@
 
   /* If buffer_out doesn't exist, it means buffer_alloc failed, which 
    * will already have set the return code */
-  if (GST_IS_BUFFER (pngdec->current_frame->output_buffer)) {
+  if (new_row && GST_IS_BUFFER (pngdec->current_frame->output_buffer)) {
     GstVideoFrame frame;
     GstBuffer *buffer = pngdec->current_frame->output_buffer;
     size_t offset;
@@ -198,13 +198,15 @@
 
     data = GST_VIDEO_FRAME_COMP_DATA (&frame, 0);
     offset = row_num * GST_VIDEO_FRAME_COMP_STRIDE (&frame, 0);
-    GST_LOG ("got row %u, copying in buffer %p at offset %" G_GSIZE_FORMAT,
-        (guint) row_num, pngdec->current_frame->output_buffer, offset);
+    GST_LOG ("got row %u at pass %u, copying in buffer %p at offset %" G_GSIZE_FORMAT,
+        (guint) row_num, (guint) pass, pngdec->current_frame->output_buffer, offset);
     width = GST_ROUND_UP_4 (png_get_rowbytes (pngdec->png, pngdec->info));
-    memcpy (data + offset, new_row, width);
+    png_progressive_combine_row(pngdec->png, data + offset, new_row);
     gst_video_frame_unmap (&frame);
     pngdec->ret = GST_FLOW_OK;
   }
+  else
+    pngdec->ret = GST_FLOW_OK;
 }
 
 static void
@@ -286,6 +288,8 @@
     png_set_palette_to_rgb (pngdec->png);
   }
 
+  png_set_interlace_handling(pngdec->png);
+
   /* Update the info structure */
   png_read_update_info (pngdec->png, pngdec->info);
 
