summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu.duponchelle@epitech.eu>2013-07-13 20:45:01 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-07-15 10:31:08 +0200
commitaffd9f37aaa350845254c7da997cbfd9ddfbbb8c (patch)
treeeee66144aeff4b574fe5a3dda9fa8bc9cb298748 /ext
parent10c91ea5b565bec250c70ed3f5f3d86e4d56e26b (diff)
Revert "oggdemux: fix seeking with negative rate with skeleton"
This reverts commit b41cd0428956f3ade9b428149e38be8e788556fe.
Diffstat (limited to 'ext')
-rw-r--r--ext/ogg/gstoggdemux.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index e86809c6cd..7cdc4b9dec 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -2886,8 +2886,7 @@ gst_ogg_demux_do_seek (GstOggDemux * ogg, GstSegment * segment,
gint64 total;
gint64 result = 0;
GstFlowReturn ret;
- gint i, pending, len;
- gboolean first_parsed_page = TRUE;
+ gint i, pending;
position = segment->position;
@@ -2911,14 +2910,14 @@ gst_ogg_demux_do_seek (GstOggDemux * ogg, GstSegment * segment,
target = position - total + begintime;
if (!do_binary_search (ogg, chain, begin, end, begintime, endtime, target,
- &best))
+ &best, FALSE, 0))
goto seek_error;
/* second step: find pages for all streams, we use the keyframe_granule to keep
* track of which ones we saw. If we have seen a page for each stream we can
* calculate the positions of each keyframe. */
GST_DEBUG_OBJECT (ogg, "find keyframes");
- len = pending = chain->streams->len;
+ pending = chain->streams->len;
/* figure out where the keyframes are */
keytarget = target;
@@ -2952,32 +2951,6 @@ gst_ogg_demux_do_seek (GstOggDemux * ogg, GstSegment * segment,
continue;
}
- /* we only do this the first time we pass here */
- if (first_parsed_page) {
- /* Now that we have a time reference from the page, we can check
- * whether all streams still have pages from here on.
- *
- * This would be more elegant before the loop, but getting the page from
- * there without breaking anything would be more costly */
- granule_time = gst_ogg_stream_get_end_time_for_granulepos (&pad->map,
- granulepos);
- for (i = 0; i < len; i++) {
- GstOggPad *stream = g_array_index (chain->streams, GstOggPad *, i);
-
- if (stream == pad)
- /* we already know we have at least one page (the current one)
- * for this stream */
- continue;
-
- if (granule_time > stream->map.total_time)
- /* we won't encounter any more pages of this stream, so we don't
- * try finding a key frame for it */
- pending--;
- }
- first_parsed_page = FALSE;
- }
-
-
/* in reverse we want to go past the page with the lower timestamp */
if (segment->rate < 0.0) {
/* get time for this pad */