Original commit message from CVS:
patch by: Ronald Bultje <rbultje@ronald.bitfreak.net>
* ext/ogg/gstoggdemux.c:
Fix sync on broken files. Fixes #158976
+2004-11-23 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ patch by: Ronald Bultje <rbultje@ronald.bitfreak.net>
+ * ext/ogg/gstoggdemux.c:
+ Fix sync on broken files. Fixes #158976
+
2004-11-23 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Edward Hervey <bilboed@bilboed.com>
gint64 position, diff;
gdouble ratio;
- if (ogg->seek_try > 5) {
- GST_DEBUG ("Seeking took too long, continuing with current page");
- goto play;
- }
-
/* see if we reached the destination position when seeking */
position = get_relative (ogg, cur, ogg_page_granulepos (page),
GST_FORMAT_TIME);
goto play;
}
+ /* not too long */
+ if (ogg->seek_try > 5) {
+ GST_DEBUG ("Seeking took too long, continuing with current page");
+ ogg->seek_to = position;
+ goto play;
+ }
+
/* seek again! yay */
ratio = (gdouble) ogg->seek_to / position;
ogg->seek_offset = ogg->seek_offset * ratio;