On Mon, 21 Jun 2010, Michael Niedermayer wrote:
On Sun, Jun 20, 2010 at 07:35:40PM +0300, Martin Storsjö wrote:
What modifications to URLProtocol are allowed without requiring a major bump? Since we've got a public function av_register_protocol that takes an URLProtocol*, doesn't even a simple addition of new fields require a major bump, since external apps could register their own URLProtocols? Despite
uhm hmm :( a hair of hackery that would solve this is to set next=1 on all of ours and malloc() + copy if its not so in register under #if
That's one possibility, although needing to set next=1 on all of ours sure feels a bit hacky. Another solution would be to add an av_register_protocol2, that takes a size parameter. Then all code that uses it can do av_register_protocol2(&myproto, sizeof(myproto)), and our code can use it sensibly. That would be more flexible if we need to add even more fields later. If we add fields to our URLProtocol, the external code will start using a malloc, until they recompile it with the latest headers again. I've got a first version of this patch series ready now, I'll post it to -devel. // Martin