> what change to what API, what magic?The changes I'd suggested to fishead_from_ogg and friends to return an int rather than a packet, so the magic check can return an error if it doesn't match. The packet/header pointer would be an added parameter to the functions. Actually I think I'd sent this to you only rather than the list. And it looks like skeleton is not used widely enough that an API change would be disruptive. If you've missed that mail, there was also in the followup patch a version of the writing code that wrote to a descriptor (more general than a FILE*). For reference, here's the patch I'd sent, but that was done before your own patch for big endian hosts (and it's using bitwise.c, which I didn't know at the time was not-really-supposed-to-be-in-ogg code). I can make the API change tonight if people think it's OK to change it now. -------------- next part -------------- A non-text attachment was scrubbed... Name: skeleton.h.diff Type: text/x-patch Size: 1297 bytes Desc: not available Url : http://lists.xiph.org/pipermail/ogg-dev/attachments/20080213/0dba514f/skeleton.h-0001.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: skeleton.c.diff Type: text/x-patch Size: 11932 bytes Desc: not available Url : http://lists.xiph.org/pipermail/ogg-dev/attachments/20080213/0dba514f/skeleton.c-0001.bin
And here's the patch, against recent liboggz. -------------- next part -------------- A non-text attachment was scrubbed... Name: skeleton_ret.diff Type: text/x-patch Size: 11563 bytes Desc: not available Url : http://lists.xiph.org/pipermail/ogg-dev/attachments/20080214/6fb5e791/skeleton_ret-0001.bin
On 14/02/2008, ogg.k.ogg.k@googlemail.com <ogg.k.ogg.k@googlemail.com> wrote:> And here's the patch, against recent liboggz.thanks! btw. you forgot to modify the memset, should be: - memset(&op, 0, sizeof(op)); + memset(op, 0, sizeof(*op)); in both ogg_from_*() functions. Applied (with memset fix) in liboggz r3457,r3458 and vorbis-tools r14508 and loosely adapted in ffmpeg2theora r14509 ;-) Conrad.