From patchwork Fri Feb 17 11:00:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Berkel X-Patchwork-Id: 2593 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp117489vsb; Fri, 17 Feb 2017 03:01:15 -0800 (PST) X-Received: by 10.223.149.137 with SMTP id p9mr5988970wrp.89.1487329275378; Fri, 17 Feb 2017 03:01:15 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d88si1282476wmh.83.2017.02.17.03.01.14; Fri, 17 Feb 2017 03:01:15 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@berkel.fr; dkim=neutral (body hash did not verify) header.i=@messagingengine.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 25482689A84; Fri, 17 Feb 2017 13:01:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EE796680A97 for ; Fri, 17 Feb 2017 13:00:59 +0200 (EET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B11CD20A57; Fri, 17 Feb 2017 06:01:05 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Fri, 17 Feb 2017 06:01:05 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=berkel.fr; h=cc :date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=pqTqTAVCO0NZzKsmHSmA9AjOrPc =; b=eZRWvEf2U/GTOsm9Gjx/J7MQt7iIY9FDAaPbsv+cSGfsVN23+q+a8wB5JcG h1I4lMX+3DJpbpIxCcVM7dgRBTXOgC3ckEiiIEZtFivzA15Aomdc7JoB52HcCGnm C3J06RMb5Izg59OxDc7K76EWPBPnUziTgWEYloKpeIWJuy8k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=pq TqTAVCO0NZzKsmHSmA9AjOrPc=; b=b950fTiRRqB8ivT+4q2jhLYW/tAsXSU5Ga DFovfLUSPN/YRleTlozb6143dPyQqz9Xry8eA+c8N5dTToatVrvPV/lBTwV+dGmm 6B8NKn6iBko8B+nLb2m5mfZB2eieSsQLgAl5UufXZx2fgu1FEuoluCpuOOrpNnlE JRLUXoxP0= X-ME-Sender: X-Sasl-enc: Qfx/XExiEfhZK7WsWN8nB6tqfzU7nfvpOw0Sr7gTgdOy 1487329265 Received: from localhost.localdomain (freebox.berkel.fr [78.229.90.61]) by mail.messagingengine.com (Postfix) with ESMTPA id 13D5424077; Fri, 17 Feb 2017 06:01:04 -0500 (EST) From: Jan Berkel To: ffmpeg-devel@ffmpeg.org Date: Fri, 17 Feb 2017 12:00:40 +0100 Message-Id: <20170217110040.87157-1-jan@berkel.fr> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH] Consistent use of user_agent in hls.c 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: Jan Berkel MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This came up while debugging a problem with mpv: https://github.com/mpv-player/mpv/issues/4155 --- libavformat/hls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 3ae3c7cc5c..e1163a7927 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -670,7 +670,7 @@ static int parse_playlist(HLSContext *c, const char *url, av_dict_set(&opts, "seekable", "0", 0); // broker prior HTTP options that should be consistent across requests - av_dict_set(&opts, "user-agent", c->user_agent, 0); + av_dict_set(&opts, "user_agent", c->user_agent, 0); av_dict_set(&opts, "cookies", c->cookies, 0); av_dict_set(&opts, "headers", c->headers, 0); av_dict_set(&opts, "http_proxy", c->http_proxy, 0); @@ -1084,7 +1084,7 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg) int is_http = 0; // broker prior HTTP options that should be consistent across requests - av_dict_set(&opts, "user-agent", c->user_agent, 0); + av_dict_set(&opts, "user_agent", c->user_agent, 0); av_dict_set(&opts, "cookies", c->cookies, 0); av_dict_set(&opts, "headers", c->headers, 0); av_dict_set(&opts, "http_proxy", c->http_proxy, 0); @@ -1623,7 +1623,7 @@ static int hls_read_header(AVFormatContext *s) if (u) { // get the previous user agent & set back to null if string size is zero - update_options(&c->user_agent, "user-agent", u); + update_options(&c->user_agent, "user_agent", u); // get the previous cookies & set back to null if string size is zero update_options(&c->cookies, "cookies", u);