<div dir="ltr">Very helpful, thank you.<div><br></div><div>I'm updating old code that uses <span style="color:rgb(117,117,117)">ffurl_register_protocol</span> - I think it might be 5 years old.  I'm replacing ffmpeg 3.03 with 3.4.  I'm very much hoping that I won't run into any other major changes, since that will probably mean some regression.  Any tips and pointers would be much appreciated.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 1, 2017 at 1:46 AM Hendrik Leppkes <<a href="mailto:h.leppkes@gmail.com">h.leppkes@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Nov 1, 2017 at 9:33 AM, Mahboud Zabetian <<a href="mailto:mzabetian@tunein.com" target="_blank">mzabetian@tunein.com</a>> wrote:<br>
> Ah, thank you.  I was hoping this would show me how I could register my own<br>
> protocols.  Our software used to ffurl_register_protocol 5 protocols.  Now<br>
> that we are upgrading to a later version of ffmpeg, I have to figure out how<br>
> to register those protocols in a different way.<br>
><br>
> I've been told the correct way is to do a avio_alloc_context, but that<br>
> doesn't take all the function pointers I need to pass in such as open and<br>
> close.<br>
><br>
> Any thoughts?  Thanks!<br>
><br>
<br>
Registering custom protocols is not supported, and functions prefixed<br>
with ff* are in a private namespace, so using such functions was<br>
always "wrong".<br>
<br>
On that note, you don't really need open and close callbacks, because<br>
it is assumed that when you call avio_alloc_context the resource was<br>
already opened (so you just call open before), and once you close the<br>
AVFormatContext, you should close the resource afterwards yourself.<br>
It gives you full control over resource management this way.<br>
<br>
- Hendrik<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div>