+ if( sub->stop > sub->start)
+ {
+ /*
+ * Normal subtitle which ends after it starts, check to
+ * see that the current video is between the start and end.
+ */
+ if( cur->start > sub->start &&
+ cur->start < sub->stop )
+ {
+ /*
+ * We should be playing this, so leave the
+ * subtitle in place.
+ *
+ * fall through to display
+ */
+ if( ( sub->stop - sub->start ) < ( 3 * 90000 ) )
+ {
+ /*
+ * Subtitle is on for less than three seconds, extend
+ * the time that it is displayed to make it easier
+ * to read. Make it 3 seconds or until the next
+ * subtitle is displayed.
+ *
+ * This is in response to Indochine which only
+ * displays subs for 1 second - too fast to read.
+ */
+ sub->stop = sub->start + ( 3 * 90000 );
+
+ sub2 = hb_fifo_see2( pv->subtitle->fifo_raw );
+
+ if( sub2 && sub->stop > sub2->start )
+ {
+ sub->stop = sub2->start;
+ }
+ }
+ }
+ else
+ {
+ /*
+ * Defer until the play point is within the subtitle
+ */
+ sub = NULL;
+ }
+ }
+ else
+ {
+ /*
+ * The end of the subtitle is less than the start, this is a
+ * sign of a PTS discontinuity.
+ */
+ if( sub->start > cur->start )
+ {
+ /*
+ * we haven't reached the start time yet, or
+ * we have jumped backwards after having
+ * already started this subtitle.
+ */
+ if( cur->start < sub->stop )
+ {
+ /*
+ * We have jumped backwards and so should
+ * continue displaying this subtitle.
+ *
+ * fall through to display.
+ */
+ }
+ else
+ {
+ /*
+ * Defer until the play point is within the subtitle
+ */
+ sub = NULL;
+ }
+ } else {
+ /*
+ * Play this subtitle as the start is greater than our
+ * video point.
+ *
+ * fall through to display/
+ */
+ }
+ }