[Ffmpeg-devel] Three ffserver patches for review
Luca Abeni
lucabe72
Fri Apr 20 16:38:58 CEST 2007
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, and I'll try to prepare a patch during the weekend?
Thanks,
Luca
More information about the ffmpeg-devel
mailing list