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 restructuring - probably on the lines of setting format-specific options on (de)muxers, that we discussed a few months ago. > this leaves url_fopen() which iam not sure how to handle best For this case, I don't think it requires any special changes. In those cases you probably don't want to set any specific details on the underlying URLContext. If you do want that, you can set up the URLContext yourself and do url_fdopen. // Martin _______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
