[FFmpeg-devel] [PATCH] Cleanup resolve_destination in sdp.c

Luca Abeni lucabe72
Wed Aug 25 15:17:47 CEST 2010


On 08/25/2010 02:44 PM, Martin Storsj? wrote:
> Hi,
>
> Now that we don't need to get explicitly IPv4 addresses in the SDP
> generation code, the resolve_destination function can be simplified a bit,
> as in the attached patch.
Looks ok if tested... I never liked that for() loop, so I am happy to
see this patch :)

> Or perhaps the whole if (ai) branch could be skipped, assuming that
> getaddrinfo() returns a failure code if nothing was returned?
If I understand the manpage correctly, if no address can be found
then a value different from 0 is returned... So, I guess that yes,
the if() can be eliminated (but please test if this is the case).


			Thanks,
				Luca



More information about the ffmpeg-devel mailing list