From patchwork Thu Mar 16 12:31:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 2954 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp733244vsy; Thu, 16 Mar 2017 05:31:55 -0700 (PDT) X-Received: by 10.28.186.70 with SMTP id k67mr8535186wmf.65.1489667515224; Thu, 16 Mar 2017 05:31:55 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a17si4305024wma.59.2017.03.16.05.31.54; Thu, 16 Mar 2017 05:31:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8582368827A; Thu, 16 Mar 2017 14:31:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpproxy19.qq.com (smtpproxy19.qq.com [184.105.206.84]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C48CA6805E3 for ; Thu, 16 Mar 2017 14:31:27 +0200 (EET) X-QQ-mid: bizesmtp7t1489667495tyob1ush3 Received: from localhost (unknown [123.120.42.140]) by esmtp4.qq.com (ESMTP) with id ; Thu, 16 Mar 2017 20:31:34 +0800 (CST) X-QQ-SSF: 01100000002000F0F930000A0000000 X-QQ-FEAT: 3jlOKZxptE7qGAvcvqZd0Y8TSpOyYFnWberLE/HqqE8HSENy8KfLxqL17Xpik +W3Ng0V4lKv+6TKA5aLSLVobGw679Lw9QMRC1vNeCbFR4VnUqz0isFI8KPdxtppjsdkzRPC yARlJp7qCWRWjWs2iy3BqLuXJuWzd4ssmcDVFZrifm0EouC7tCMt/77OiO2pUobs6kgAmiv F0krMrsVH3EuHZ3z/Dy75sNvyR705oqFJYHLT8N1oBqpxZwh3+PuArfIG/RrK32Mn2cTrrT lf7XibWWmR5ebrt9XHKt32YTM= X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Mar 2017 20:31:34 +0800 Message-Id: <20170316123134.91106-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.10.1 (Apple Git-78) X-QQ-SENDSIZE: 520 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH v2] avformat/rtmpproto: change rtmp_open from url_open to url_open2 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Steven Liu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" use the option set by user Reported-by: Lancelot Lai Signed-off-by: Steven Liu --- libavformat/rtmpproto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 5d7ad79..bbafa77 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2604,14 +2604,14 @@ static int inject_fake_duration_metadata(RTMPContext *rt) * and 'playpath' is a file name (the rest of the path, * may be prefixed with "mp4:") */ -static int rtmp_open(URLContext *s, const char *uri, int flags) +static int rtmp_open(URLContext *s, const char *uri, int flags, AVDictionary **options) { RTMPContext *rt = s->priv_data; char proto[8], hostname[256], path[1024], auth[100], *fname; char *old_app, *qmark, *n, fname_buffer[1024]; uint8_t buf[2048]; int port; - AVDictionary *opts = NULL; + AVDictionary *opts = *options; int ret; if (rt->listen_timeout > 0) @@ -3141,7 +3141,7 @@ static const AVClass flavor##_class = { \ \ const URLProtocol ff_##flavor##_protocol = { \ .name = #flavor, \ - .url_open = rtmp_open, \ + .url_open2 = rtmp_open, \ .url_read = rtmp_read, \ .url_read_seek = rtmp_seek, \ .url_read_pause = rtmp_pause, \