[gstreamer-bugs] [Bug 412648] [filesink] reports wrong (byte) position after seeking

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri May 18 12:26:52 PDT 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=412648

  GStreamer | gstreamer (core) | Ver: HEAD CVS




------- Comment #4 from Tim-Philipp Müller  2007-05-18 19:26 UTC -------
This seems to have been introduced by this commit:

http://webcvs.freedesktop.org/gstreamer/gstreamer/plugins/elements/gstfilesink.c?r1=1.16&r2=1.17

with the commit message "Add support for not incrementing bytecounter while
we're not at the end of the stream".

Back then, data_written was used to report TOTAL LENGTH of the current file,
and not the position, see:

http://webcvs.freedesktop.org/gstreamer/gstreamer/plugins/elements/gstfilesink.c?annotate=1.17


So the way I read it is that this code was added to handle the case where the
current position is N bytes before the end of the file and the amount of data
to be written is X (with X >= N).  In this case, data_written will be updated
correctly to reflect the new total size, if I'm not mistaken.  However, I think
this fails for the case where X < N, in this case data_written will wrongly be
decremented even though it should stay the same.


In short: I think the patch makes sense and should be applied, although it'd
probably a good idea to rename the data_written member to current_position or
such as well.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=412648.




More information about the Gstreamer-bugs mailing list