NetBSD Problem Report #51520

From www@NetBSD.org  Sat Oct  1 00:10:51 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B91087A265
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  1 Oct 2016 00:10:51 +0000 (UTC)
Message-Id: <20161001001050.B65A77A2BC@mollari.NetBSD.org>
Date: Sat,  1 Oct 2016 00:10:50 +0000 (UTC)
From: adrien_fernandes2@hotmail.com
Reply-To: adrien_fernandes2@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: multimedia/ffmpeg3 - getnameinfo: Non-recoverable failure in name resolution on RTP incoming streams
X-Send-Pr-Version: www-1.0

>Number:         51520
>Category:       pkg
>Synopsis:       multimedia/ffmpeg3 - getnameinfo: Non-recoverable failure in name resolution on RTP incoming streams
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 01 00:15:00 +0000 2016
>Last-Modified:  Mon Oct 31 04:20:00 +0000 2016
>Originator:     Adrien Fernandes
>Release:        pkgsrc current 22nd July 2016
>Organization:
>Environment:
NetBSD 7.99.34 (GENERIC.201607240240Z) amd64
>Description:
It is actually impossible to read a RTP protocole stream with multimedia/ffplay3.

$ /home/Adrien2002/Programmes/NetBSD/bin/ffplay3 rtp://127.0.0.1:1234
[rtp @ 0x7ae5c5903800] getnameinfo: Non-recoverable failure in name resolution
rtp://127.0.0.1:1234: Input/output error

After patched multimedia/ffmpeg3, it worked, I can watch my stream.
>How-To-Repeat:
Try to read an incoming RTP stream.
>Fix:
--- libavformat/rtsp.c.orig	2016-10-01 02:05:05.262490405 +0200
+++ libavformat/rtsp.c	2016-10-01 02:06:28.990605339 +0200
@@ -2301,7 +2301,7 @@
             AVDictionary *opts = map_to_opts(rt);

             err = getnameinfo((struct sockaddr*) &rtsp_st->sdp_ip,
-                              sizeof(rtsp_st->sdp_ip),
+                              rtsp_st->sdp_ip.ss_len,
                               namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST);
             if (err) {
                 av_log(s, AV_LOG_ERROR, "getnameinfo: %s\n", gai_strerror(err));

>Audit-Trail:
From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/51520: multimedia/ffmpeg3 - getnameinfo: Non-recoverable
 failure in name resolution on RTP incoming streams
Date: Mon, 31 Oct 2016 03:50:56 +0000

 sa_len is not portable, is there a 'right' fix?

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51520: multimedia/ffmpeg3 - getnameinfo: Non-recoverable
 failure in name resolution on RTP incoming streams
Date: Mon, 31 Oct 2016 04:17:52 +0000

 On Mon, Oct 31, 2016 at 03:55:01AM +0000, coypu@SDF.ORG wrote:
  >  sa_len is not portable, is there a 'right' fix?

 Wherever the sockaddr comes from should also have the length
 explicitly - e.g. accept, getsockname, and so on pass it back and if
 the sockname was consed up by the program itself it should know the
 proper length at that point. So the value should be around
 somewhere...

 (I haven't looked at the code myself yet obviously)

 -- 
 David A. Holland
 dholland@netbsd.org

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.