[Bug 749690] splitfilesrc: Implement binary search in find_part_for_offset

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun May 24 03:34:48 PDT 2015


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

--- Comment #6 from Jimmy Ohn <yongjin.ohn at lge.com> ---
(In reply to Jan Schmidt from comment #5)
> Review of attachment 303829 [details] [review]:
> 
> Thanks for the patch - still needs one minor fix I missed the first time.
> 
> ::: gst/multifile/gstsplitfilesrc.c
> @@ +390,3 @@
> +  part =
> +      gst_util_array_binary_search (src->parts, src->num_parts,
> +      sizeof (GstFilePart),
> 
> Sorry - I missed this on the first review. The size of the array elements is
> one pointer, not an entire GstFilePart - so it should be 'sizeof
> (GstFilePart  *)' not 'sizeof (GstFilePart)'.
> 
> I imagine this would crash fairly badly - have you tested it at all?

Thanks for the review.
I tested using gst-launch like below command.
gst-launch-1.0 playbin
uri="splitfile:///home/yongjinohn/testmovie/Gossip1x01_1.avi" It's working for
me.
Is it right about the sizeof (GstFilePart *)? I just reference qtdemux code. 
Here is the qtdemux code.

969   QtDemuxSample *result;
970   guint32 index;
971 
972   /* convert media_time to mov format */
973   media_time =
974       gst_util_uint64_scale_ceil (media_time, str->timescale, GST_SECOND);
975 
976   result = gst_util_array_binary_search (str->samples, str->stbl_index + 1,
977       sizeof (QtDemuxSample), (GCompareDataFunc) find_func,
978       GST_SEARCH_MODE_BEFORE, &media_time, NULL);

-- 
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