[Libav-user] How do I use AVIOContext for custom IO?

wl2776 wl2776 at gmail.com
Tue Jul 26 15:33:58 CEST 2011

wl2776 wrote:
> I was applying the scheme that I was using with ByteIOContext for years.
> Now ByteIOContext it deprecated, and I've switched to AVIOContext.
> ...
> Here is my code. It's rather simple.
> So, what has changed in libav and how should I change my code?
It seems, I've found the solution :(
If I link my app with the dynamic libraries, it doesn't work. My function
read_packets isn't called.
If I link my app with static libraries, my function is called.

I've met something similar, when worker with the GStreamer and tried to
define a custom callbacks instead of the default one.
There was an API function which was passed a single argument - the address
of the callback function.
This function was to remove that callback from the internal list.
And the default callback function had different addresses when seen from
DLL, and when seen from an application.

Sad, will have to store two copies of code in two components. Damned
Microsoft. :(

View this message in context: http://libav-users.943685.n4.nabble.com/How-do-I-use-AVIOContext-for-custom-IO-tp3695410p3695742.html
Sent from the libav-users mailing list archive at Nabble.com.

More information about the Libav-user mailing list