On Mon, Jun 14, 2010 at 11:36:07AM +0300, Martin Storsjö wrote:
On Fri, 11 Jun 2010, Michael Niedermayer wrote:
On Wed, Jun 09, 2010 at 01:53:51PM -0400, Ronald S. Bultje wrote:
This, and many other regressions, are all caused because URL* combines allocation with opening, something that AVFormatContext/AVCodecContext separate. The proper thing to do is to separate it also. That breaks or adds API, which is bad, but maybe we just have to byte the bullet. It also means we have to separate close and free.
Michael, that OK with you, if it doesn't break existing API/apps?
the only thing needed for url_open() / url_open_protocol() is to pass a allocated context and add a flag that indicates that the context has already been allocated
then we need a function like avformat_alloc_context() for allocation
In general, that sounds like a good solution.
For this particular case, the options that we would like to set are http specific, and (with the current design) are to be set within HTTPContext, that is allocated and set to URLContext->priv_data only in http_open (and its size isn't even known outside of http.c. So that would require some
add a URLProtocol.priv_data_size this also might simplify existing code by moving allocation of priv_data to a common place [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates