Marton Balint (12020-08-04): > So you are returning NULL pointers here and success at the same time. This > does not look like a good idea, e.g. checking fields later on involves > arithmetic on NULL pointers, no? I don't really see it useful that we handle > NULL url here, we are better off with an assert IMHO.
It only involves NULL+0 and NULL-NULL. But I see your concern. I removed this hunk and added instead: if (!base) base = ""; just before the call in the second patch. > This is the only place where we might return failure. Maybe we could convert > this to void() function to simplify usage a bit, and either > - assume no port, if it is not paraseable or > - not split host and port, so we don't have to parse IPv6 mess here, > therefore the error can't happen. I think catching invalid input as early and as often as possible is best. We need to update callers of ff_make_absolute_url() to handle truncated output anyway. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".