[Bug 749653] dashdemux: Implement binary search for stream_sidx_seek

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jul 29 06:56:08 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=749653

--- Comment #19 from Jimmy Ohn <yongjin.ohn at lge.com> ---
(In reply to Thiago Sousa Santos from comment #18)
> Review of attachment 304492 [details] [review]:
> 
> ::: ext/dash/gstdashdemux.c
> @@ +928,3 @@
> +      sizeof (GstSidxBoxEntry),
> +      (GCompareDataFunc) gst_dash_demux_index_entry_search,
> +      GST_SEARCH_MODE_AFTER, &ts, NULL);
> 
> Don't we want GST_SEARCH_MODE_BEFORE here?
> 
> Suppose you have the following entries:
> entry[0] = 0
> entry[1] = 10
> entry[2] = 20
> 
> If you seek to 5, you want to start from 0, not from 10, right?
> 
> @@ +940,2 @@
>    else
>      dashstream->sidx_current_remaining = 0;
> 
> Assuming pts is a non-negative value and if we use GST_SEARCH_MODE_BEFORE,
> there is still a chance that we are seeking after the last element and we
> will get the last one. In this case we want to go with the 'else' option
> here. This should need special handling. Maybe before doing the binary
> search just check if the ts is already past the last element on the entries
> array.

Thanks for your review. I upload the new patch for your comment.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list