[Ffmpeg-devel] Three ffserver patches for review

Michael Niedermayer michaelni
Fri Apr 20 17:31:51 CEST 2007


On Fri, Apr 20, 2007 at 04:38:58PM +0200, Luca Abeni wrote:
> Hi Michael,
> Michael Niedermayer wrote:
> [...]
> >>1) I do not know if the libavformat/utils.c modifications are ok (others 
> >>will have to comment on this)
> >
> >hmm, why doesnt ffserver use AVFormatContext?
> Good question :)
> I am not sure if I know ffserver enough to have the answer...
> Anyway, here is my (maybe wrong) understanding:
> ffserver does use AVFormatContext, but in this particular function - 
> add_av_stream1() - it wants to create an AVStream independently from any 
> AVFormatContext, during the initialization.
> 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 am not sure why this is done; maybe ffserver wants to prepare a 
> "pre-compiled" AVStream in advance, on program startup, to fill the 
> AVFormatContext's streams with it for performance reasons?
> (BTW, this memcpy() in rtp_new_av_stream() is the thing which was 
> causing the crash I fixed with my patch)
> Unfortunately, my understanding of ffserver is too limited... :(
> If current ffserver code is wrong, can you quickly explain what it 
> should do, 

me?! ive no clue about ffserver, its just that my feeling tells me
that it should not memcpy AVStreams into AVFormatContext ...
its ugly and hackish and theres no speed gain IMHO

> and I'll try to prepare a patch during the weekend?
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070420/192f29b7/attachment.pgp>

More information about the ffmpeg-devel mailing list