[Vorbis-dev] Patch to stop vcut from generating broken streams

Michael Smith msmith
Sun Jun 20 18:41:51 PDT 2004


On Saturday 19 June 2004 12:12, Michael Vrable wrote:
> The attached patch is intended to fix the bug in vcut where the
> granulepos on each page is not always set correctly in the output
> stream.  (See, for example, the discussion on vorbis-dev at xiph.org in
> August 2003, "vcut breaks song index ? XMMS search fails".)  It's an
> issue I came up against while editing the recording of a webcast I
> helped organize; I created a workable fix then, and I've tried to clean
> it up now.
>
> The patch should be against the most recent version of vcut from
> svn.xiph.org (not that it seems to be undergoing much active
> development).

Well, yes. vcut isn't built by default, and I've been suggesting for the past
year or so that nobody should ever use it. It was written as proof-of-concept
code, and it successfully proved the concept. It isn't intended for actual
use. The fact that it went into vorbis-tools was, in retrospect, a mistake.


> I've given it some testing, and haven't noticed any broken streams
> created yet.  But there could still be bugs.  One case that I haven't
> tested yet, and which might be still problematic, is splitting a stream
> which starts at a positive granulepos (such as audio saved from the
> middle of a network stream).
>
> I tried to stick to the original coding style as closely as I could.
> (Including what appeared to be 4-space tabs(!).)

They're the only reasonable way to do tabs! :-) (oh, and you missed "80 column
lines", which isn't stuck to as closely as it should be in the existing
source, but is intended...)


>
> I'm not sure if I should be putting myself in the copyright section or
> not; I'm willing to take that out, assign copyrights to Xiph, etc., if
> needed.
>
> It would be nice to see this patch, or some other bug fix, applied to
> the vcut sources.  If there are issues with the patch that should be
> addressed, please let me know.
>

Whilst I expect (without having actually looked at it yet) that this patch
drastically improves things, I don't really want to do anything to vcut that
might suggest to people that it's actually considered _usable_ (because I
don't, even with these fixes, due to a) and b) below.)

Well... unless you actually make it work properly in all cases - at the very
least this requires heavy testing on streams with a) the start cut off, as
you described, and b) chained streams. Neither of which currently work.

Mike



More information about the Vorbis-dev mailing list