Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 pdf-presenter-console (4.0.4-1) unstable; urgency=medium
 .
   * New upstream release
   * Track upstream bug fixes
Author: Barak A. Pearlmutter <bap@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2016-11-28

--- pdf-presenter-console-4.0.4.orig/README.rst
+++ pdf-presenter-console-4.0.4/README.rst
@@ -202,6 +202,10 @@ Now download some [sample presentations]
 
     pdfpc pdfpc-demo.pdf
 
+FAQ
+===
+* Embedded video playback is not working.
+ * You likely have a ``gstreamer`` codec issue.  Try loading the video file you want to play with the following command: ``gst-launch-1.0 filesrc location=<your video> ! decodebin ! autovideosink``  If the video plays, go ahead and `submit an issue <https://github.com/pdfpc/pdfpc/issues>`_.  Otherwise, the command will likely output some good hints for why gstreamer cannot decode the video.
 
 Acknowledgements
 ================
--- pdf-presenter-console-4.0.4.orig/rc/pdfpc.css
+++ pdf-presenter-console-4.0.4/rc/pdfpc.css
@@ -22,14 +22,14 @@ progressbar trough {
     background-color: white;
 }
 
-GtkProgressBar * {
-    background-color: blue;
-}
-
 GtkProgressBar {
     background-color: white;
 }
 
+GtkProgressBar * {
+    background-color: blue;
+}
+
 /* The bottom text is automatically sized based on the resolution of
  * the presenter's screen but setting this value in the user's custom
  * CSS will override the auto-sizing.  See the man page for more
--- pdf-presenter-console-4.0.4.orig/src/classes/presentation_controller.vala
+++ pdf-presenter-console-4.0.4/src/classes/presentation_controller.vala
@@ -684,18 +684,14 @@ namespace pdfpc {
          * Was the previous slide a skip one?
          */
         public bool skip_previous() {
-            return this.current_slide_number > this.metadata.user_slide_to_real_slide(
-                this.current_user_slide_number);
+            return this.current_slide_number > 0 && this.metadata.real_slide_to_user_slide(this.current_slide_number - 1) == this.metadata.real_slide_to_user_slide(this.current_slide_number);
         }
 
         /**
          * Is the next slide a skip one?
          */
         public bool skip_next() {
-            return (this.current_user_slide_number >= this.metadata.get_user_slide_count() - 1
-                && this.current_slide_number < this.n_slides)
-                || (this.current_slide_number + 1 < this.metadata.user_slide_to_real_slide(
-                this.current_user_slide_number + 1));
+            return this.current_slide_number < this.n_slides && this.metadata.real_slide_to_user_slide(this.current_slide_number) == this.metadata.real_slide_to_user_slide(this.current_slide_number + 1);
         }
 
         /**
@@ -811,11 +807,7 @@ namespace pdfpc {
             // there is a next slide
             if (this.current_slide_number < this.n_slides - 1) {
                 ++this.current_slide_number;
-
-                // if the next slide is also a new user slide
-                if (this.current_slide_number == this.metadata.user_slide_to_real_slide(this.current_user_slide_number + 1)) {
-                    ++this.current_user_slide_number;
-                }
+                this.current_user_slide_number = this.metadata.real_slide_to_user_slide(this.current_slide_number);
 
                 if (!this.frozen) {
                     this.faded_to_black = false;
@@ -893,12 +885,8 @@ namespace pdfpc {
             this.timer.start();
 
             if (this.current_slide_number > 0) {
-                if (this.current_slide_number == this.metadata.user_slide_to_real_slide(this.current_user_slide_number)) {
-                    --this.current_user_slide_number;
-                    this.current_slide_number = this.metadata.user_slide_to_real_slide(this.current_user_slide_number);
-                } else {
-                    --this.current_slide_number;
-                }
+                --this.current_slide_number;
+                this.current_user_slide_number = this.metadata.real_slide_to_user_slide(this.current_slide_number);
 
                 if (!this.frozen) {
                     this.faded_to_black = false;
--- pdf-presenter-console-4.0.4.orig/src/pdfpc.vala
+++ pdf-presenter-console-4.0.4/src/pdfpc.vala
@@ -187,7 +187,6 @@ namespace pdfpc {
                 Posix.exit(0);
             }
 
-            stdout.printf("%s\n", Options.notes_position);
             if (Options.notes_position != null) {
                 Options.disable_auto_grouping = true;
                 stderr.printf("--notes option detected. Disable auto grouping.\n");
