multifilesrc: set position as offset from start-index
authorPrashant Gotarne <ps.gotarne@samsung.com>
Thu, 16 Jul 2015 04:18:46 +0000 (09:48 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 27 May 2016 19:32:08 +0000 (20:32 +0100)
query position in GST_FORMAT_BUFFER returns
offset from start-index rather than index.

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

gst/multifile/gstmultifilesrc.c

index 07707e2..fd24642 100644 (file)
@@ -258,7 +258,8 @@ gst_multi_file_src_query (GstBaseSrc * src, GstQuery * query)
       switch (format) {
         case GST_FORMAT_BUFFERS:
         case GST_FORMAT_DEFAULT:
-          gst_query_set_position (query, GST_FORMAT_BUFFERS, mfsrc->index);
+          gst_query_set_position (query, format,
+              mfsrc->index - mfsrc->start_index);
           res = TRUE;
           break;
         default: