[Ffmpeg-devel] Three ffserver patches for review

Alex Beregszaszi alex
Thu Apr 19 01:49:03 CEST 2007


> remove_ffserver_callbacks.diff:
> remove the ff_rtsp_callback() from ffserver.c. This callback does not 
> seem to be used by anyone, and it is not clear how it should be used / 
> why it is useful. I removed it because rtsp_cmd_teardown() calls it 
> passing some rtp_c fields as parameters, after performing 
> close_connection(rtp_c), which does av_free(rtp_c).
> The problem could be solved by moving close_connection() after the call 
> to ff_rtsp_callback(), but since it is not possible to test 
> ff_rtsp_callback(), I do not know if the change would break it.
> At least, this patch makes it clear that if someone cares about 
> ff_rtsp_callback() he should fix rtsp_cmd_teardown().

Better if we don't have that much unused code. Remove it.

> fix_possible_ffserver_crash.diff:
> rtsp_cmd_teardown() calls
> url_fprintf(c->pb, "Session: %s\r\n", rtp_c->session_id)
> after freeing rtp_c. This patch fixes the bug by copying 
> rtp_c->session_id before freeing rtp_c.

I guess ok.

> do_not_allocate_feed_data_for_files.diff:
> when ffserver is initialized, it allocates the AVStream->priv_data field 
> for containing "feed information" in every AVStream, even if they do not 
> use any feed. This is ok if the input stream is a "live feed" coming 
> from ffmpeg, but is not ok for regular files.

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.

Alex Beregszaszi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: avstream.diff
Type: text/x-patch
Size: 2014 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070419/99ca69aa/attachment.bin>

More information about the ffmpeg-devel mailing list