[FFmpeg-devel] [PATCH] rtsp.c small cleanups

Luca Barbato lu_zero
Sat Mar 21 14:52:34 CET 2009

Ronald S. Bultje wrote:
> Hi,
> Attached are small cleanups for rtsp.c.
> (1) use skip_spaces(&p); instead of while (redir_isspace(*p)) p++;


> (2) merge get_word() and get_word_sep() into a general function,
> remove the redir_isspace() function by a macro that calls strchr()


> (3) stupid bug in hex_to_data()


> (4) reindent fix


> (5) removing a useless comment about something deprecated


> (6) removing slash-skipping code because the called function
> get_word_sep() does that already.


> (7) free extradata if it already exists, fixes theoretical memleak

Ok, I think it is quite practical

> (8) remove sdp_read_packet() and replace it with rtsp_read_packet()
> because that's all it does

rtsp_read_packet should be splitted at least in 3...

> This was my general quick read of rtsp.c. I intend to next see if
> rtsp.c conforms correctly to all standards and if I should do any
> additional work. Might lead to some changes in the SDP parsing code or
> the order or type of RTSP commands that we send. I might also analyze
> rtpdec.c at some point.

Thank you for your work =)



Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC

More information about the ffmpeg-devel mailing list