*** gst-plugins-bad-0.10.19/ext/gme/gstgme.c	2010-02-15 12:47:47.000000000 +0000
--- gst-plugins-bad-0.10.19m/ext/gme/gstgme.c	2011-04-10 20:35:50.000000000 +0100
***************
*** 400,406 ****
      }
    }
  
!   if (gme_track_ended (gme->player)) {
      gst_pad_pause_task (pad);
      gst_pad_push_event (pad, gst_event_new_eos ());
    }
--- 400,406 ----
      }
    }
  
!   if (gme_track_ended (gme->player) || gme_tell(gme->player) * GST_MSECOND > gme->intro_duration + gme->loop_duration * 2) {
      gst_pad_pause_task (pad);
      gst_pad_push_event (pad, gst_event_new_eos ());
    }
***************
*** 475,480 ****
--- 475,482 ----
  
    gme->total_duration = total_duration =
        gst_util_uint64_scale_int (info->play_length, GST_MSECOND, 1);
+   gme->intro_duration = gst_util_uint64_scale_int (info->intro_length, GST_MSECOND, 1);
+   gme->loop_duration  = gst_util_uint64_scale_int (info->loop_length, GST_MSECOND, 1);
  
    gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
        GST_TAG_DURATION, total_duration, NULL);
*** gst-plugins-bad-0.10.19/ext/gme/gstgme.h	2010-05-14 01:48:27.000000000 +0100
--- gst-plugins-bad-0.10.19m/ext/gme/gstgme.h	2011-04-10 20:35:15.000000000 +0100
***************
*** 56,61 ****
--- 56,63 ----
    int         seekpoint;
  
    GstClockTime total_duration;
+   GstClockTime intro_duration;
+   GstClockTime  loop_duration;
  };
  
  struct _GstGmeDecClass
