[Ffmpeg-devel] Three ffserver patches for review

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

Hi Alex,

Alex Beregszaszi wrote:
> Rejected, it must be a bug somewhere else. add_av_stream1 is basically
> equivalent to av_new_stream in utils.c. My local tree uses av_new_stream
> and removes duplicates.
> I guess rtp_new_av_stream should be simplified aswell.
> Attached is the patch, which is not really SVN ready, but you should get
> the idea.
I attach a version of your patch that actually works for me (I changed 
the "#if 0" in "#if 1", and added the code for properly set the codec).

With this patch applied, RTSP/RTP streaming works without crashing when 
closing the second RTP session (it does not crash because your patch 
does not allocate fst->priv_data).
1) I do not know if the libavformat/utils.c modifications are ok (others 
will have to comment on this)
2) I _suspect_ your patch will actually break things for you, because it 
does not allocate fst->priv_data anymore... So, I suspect that streams 
receaving data through an ffmpeg feed might break. In my opinion, 
something like
     if (stream->feed) {
         fst->priv_data = av_mallocz(sizeof(FeedData));
     } else {
         fst->priv_data = NULL;
will be needed, but I might be wrong...

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avstream.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070420/a82b9933/attachment.asc>

More information about the ffmpeg-devel mailing list