[FFmpeg-devel] [PATCH] fix sdp(file) vs rtsp dep
Diego Biurrun
diego
Wed Nov 11 22:00:14 CET 2009
On Wed, Nov 11, 2009 at 11:28:24AM +0100, Luca Abeni wrote:
> Luca Abeni wrote:
> [...]
> >>Anyway, the patch is quite big. Maybe you could split it by first
> >>moving the functions around.
> >
> >Ok; I'll try to do this when I'll find some more time to work on this
> >patch.
>
> Next round of patches:
> - move_functions-2.diff moves some code around, to simplify the following
> patches
Luca B told me on IRC that moving functions around is OK, so you should
just commit this.
> - split_read-1.diff splits the sdp_read_packet() function out of
> rtsp_read_packet(). This allows to avoid compiling RTSP code when not
> needed (as done in the next patch).
> - add-ifdefs.diff adds some ifdefs to avoid compiling the RTSP code when
> the RTSP demuxer is disabled, and removes a useless "#if
> CONFIG_SDP_DEMUXER"
> The last patch should make it clear why I think that the RTSP demuxer
> should depend on the SDP demuxer and not vice-versa...
>
> I did not do any renaming yet, but I think it can be done later.
> Some work is still needed to split the code in two different files
> (sdp.c and rtsp.c) but I have no time right now...
I'm not sure if this is really simpler than renaming and splitting the
file right away, whatever, if you think it is, go for it...
> --- ffmpeg.orig/libavformat/rtsp.c 2009-11-11 09:11:15.000000000 +0100
> +++ ffmpeg/libavformat/rtsp.c 2009-11-11 09:12:48.000000000 +0100
> @@ -43,6 +43,8 @@
> //#define DEBUG
> //#define DEBUG_RTP_TCP
>
> +static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
> + uint8_t *buf, int buf_size);
> static int rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
> unsigned char **content_ptr,
> int return_on_interleaved_data);
Ugh, more forward declarations. Can't these be avoided?
Diego
More information about the ffmpeg-devel
mailing list