[FFmpeg-devel] [PATCH] fix sdp(file) vs rtsp dep

Diego Biurrun diego
Sun Oct 18 12:59:19 CEST 2009


On Sun, Oct 18, 2009 at 01:59:37AM +0200, Luca Barbato wrote:
> Diego pointed out that there was something wrong with the deps between
> the sdp and the rtsp demuxer.
> 
> The sdp demuxer is just the rtsp demuxer that instead of fetching the
> stream description through rtsp it just read it from a plain file.
> 
> That said the attached patches fix the missing symbols at link if the
> rtsp demuxer is disabled and the sdp demuxer enabled.

The second patch is OK, but there are more skeletons lurking in the
closet.

All of the RTP/SDP/RTSP code seems to be in for a great refactoring.
For example:

- sdp.o is not compiled conditionally and is enclosed in
  '#if CONFIG_RTP_MUXER'.  This should be done in the Makefile instead
  and the file should be called rtp.o if that's what it implements.

- The redir demuxer is dubious.

- rtsp.c should be split.

- sdp_read_packet() and sdp_read_close() look like pointless wrapper
  functions that could be directly replaced by their rtsp counterparts.
  The sdp demuxer depends on the rtsp demuxer.  So why not use the rtsp
  functions directly instead of wrapping them.

> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -192,8 +192,16 @@ OBJS-$(CONFIG_RTP_MUXER)                 += rtp.o         \
> -OBJS-$(CONFIG_RTSP_DEMUXER)              += rdt.o rtsp.o rtp_vorbis.o rtp_asf.o
> -OBJS-$(CONFIG_SDP_DEMUXER)               += rtsp.o rtp.o rtpdec.o rtp_h264.o rtp_vorbis.o rtp_asf.o
> +OBJS-$(CONFIG_RTSP_DEMUXER)              += rdt.o        \
> +					    rtsp.o       \
> +					    rtp_vorbis.o \
> +					    rtp_asf.o
> +OBJS-$(CONFIG_SDP_DEMUXER)               += rtsp.o       \
> +					    rtp.o        \
> +					    rtpdec.o     \
> +					    rtp_h264.o   \
> +					    rtp_vorbis.o \
> +					    rtp_asf.o

Oh, come on, tabs, how lame is that ... ?

Diego



More information about the ffmpeg-devel mailing list