On 24/11/15 08:51, Martin Storsjö wrote:
> On Tue, 24 Nov 2015, Luca Barbato wrote:
>
>> And properly report the error when it happens.
>> ---
>> libavformat/rtsp.c | 11 +++++++++--
>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
>> index f62e370..5973f9b 100644
>> --- a/libavformat/rtsp.c
>> +++ b/libavformat/rtsp.c
>> @@ -2264,8 +2264,15 @@ static int sdp_read_header(AVFormatContext *s)
>> if (!(rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)) {
>> AVDictionary *opts = map_to_opts(rt);
>>
>> - getnameinfo((struct sockaddr*) &rtsp_st->sdp_ip,
>> sizeof(rtsp_st->sdp_ip),
>> - namebuf, sizeof(namebuf), NULL, 0,
>> NI_NUMERICHOST);
>> + err = getnameinfo((struct sockaddr*) &rtsp_st->sdp_ip,
>> + sizeof(rtsp_st->sdp_ip),
>> + namebuf, sizeof(namebuf), NULL, 0,
>> NI_NUMERICHOST);
>> + if (err) {
>> + av_log(s, AV_LOG_ERROR, "getnameinfo: %s\n",
>> gai_strerror(err));
>> + err = AVERROR(EIO);
>> + abort();
>> + goto fail;
>> + }
>
> Why both abort and goto fail?
>
> Looks good other than that.
>
abort() was supposed to be dropped, amending and pushing soon.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel