[Ffmpeg-devel] Three ffserver patches for review

Luca Abeni lucabe72
Fri Apr 20 16:49:04 CEST 2007


Hi,

Luca Abeni wrote:
[...]
> This AVStream will be memcpy()ed into a newly created AVFormatContext 
> later, in rtp_new_av_stream(), when an RTP connection is created (I 
> suppose something similar happens for HTTP too?)
I just checked, and yes, this is done in the HTTP case too: in 
http_prepare_data(), around line 2013
[...]
             AVStream *st;
             AVStream *src;
             st = av_mallocz(sizeof(AVStream));
             st->codec= avcodec_alloc_context();
             c->fmt_ctx.streams[i] = st;
             /* if file or feed, then just take streams from FFStream 
struct */
             if (!c->stream->feed ||
                 c->stream->feed == c->stream)
                 src = c->stream->streams[i];
             else
                 src = c->stream->feed->streams[c->stream->feed_streams[i]];

             *st = *src;
             st->priv_data = 0;
[...]
BTW, the last "st->priv_data = 0" seems to be the reason why the crash I 
was seeing does not happen for HTTP... I'll try to redo my patch in a 
similar way.


				Luca




More information about the ffmpeg-devel mailing list