From patchwork Thu Oct 26 15:58:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_Gro=C3=9Fe?= X-Patchwork-Id: 5698 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp975790jah; Thu, 26 Oct 2017 08:59:22 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TPgom7+s6C1hhpqJLKZrl3fEK7EN6M1oDfywqwWbjnCzEOpfvxKKRS91STRZ2tGZmK3FDE X-Received: by 10.223.195.131 with SMTP id p3mr6174682wrf.89.1509033562254; Thu, 26 Oct 2017 08:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509033562; cv=none; d=google.com; s=arc-20160816; b=S7Z5XALXc1K9yhce99RqiFQBovJhwft9EhJZFekrmv3J7HSEvdNAJvh+WFNxo01vNT ONANx828vGEUay8n+DLDlRd8XNSsGn4cIexZ9PAgah7keuK/JGQnZDteGJilwhKOOtJH bo7htJ+bZ0JuLbisWUamo8RpxLFaMmlawuRmP6481ZXSoN8l9IGa3VmJeOzssjUI5h1J Bu8WL3d3VMkSXLF/8ZvByGCZckEEZQOdomowwOT9XTAouXmVXgTKCwfy6jUkEriSDfpu qsSxfBSTv7Nf/Z5mkI4tXOEKTGniPOp5tg/Svab0TGNBud0eUIJF84QEmsZ5u7IaUbAK M0GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=2/MrW2Y1fWqZlBR2jTFOLnZEftC2t01p8Ep634ecwqY=; b=dppQwcNBO4PkjSoSsr2bxpWTkgJJRuddMl6xqYRHjCkiQ+zAjBdM82N7kG4M66CUnk Q+wCH8iWE376qujdH/IkBtCMR7PN50/r4v7zdZ1tQm4niEQiD2T54V2pW3BlXAQYO6TV emZq1yuOEhwOtqDqTHVTFJWdOk5XAbmCq67xWtPMupGDOn9Z2Vj03n6txR+mCtbkvwLn lsrcFgpu5sfcBO7CpKjW11SQi1pDT74cghqNB5nWj8F9WbTd5vyCG64YEVNMGLZeWBL+ UNnv0zm5CZ4qqxM7qTclqupHdZmM9zfsu6RARmrt2lUkYICHcRcqvTiYAdxsRqBt8R59 +XEQ== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x73si1168938wme.29.2017.10.26.08.59.21; Thu, 26 Oct 2017 08:59:22 -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 747A868A610; Thu, 26 Oct 2017 18:58:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from james.theweblords.de (james.theweblords.de [217.11.55.87]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DBAE568A5EB for ; Thu, 26 Oct 2017 18:58:48 +0300 (EEST) Received: (qmail 23959 invoked by uid 210); 26 Oct 2017 15:58:56 -0000 X-Qmail-Scanner-Diagnostics: from wl-r3-231.rz.tu-ilmenau.de (petronios@theweblords.de@wl-r3-231.rz.tu-ilmenau.de) by james (envelope-from , uid 201) with qmail-scanner-2.10st (mhr: 1.0. spamassassin: 3.4.1. perlscan: 2.10st. Clear:RC:1(141.24.16.231):. Processed in 0.045475 secs); 26 Oct 2017 15:58:56 -0000 Received: from wl-r3-231.rz.tu-ilmenau.de (HELO montepegro.fem.tu-ilmenau.de) (petronios@theweblords.de@141.24.16.231) by james.theweblords.de with ESMTPA; 26 Oct 2017 15:58:56 -0000 From: =?UTF-8?q?Peter=20Gro=C3=9Fe?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 26 Oct 2017 17:58:35 +0200 Message-Id: <20171026155840.16816-3-pegro@friiks.de> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171026155840.16816-1-pegro@friiks.de> References: <20171026155840.16816-1-pegro@friiks.de> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] dashenc: use av_dict_set_int instead of static function 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: =?UTF-8?q?Peter=20Gro=C3=9Fe?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Peter Große --- libavformat/dashenc.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index a4b37403d6..1b3acb7ac9 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -664,14 +664,6 @@ static int dict_copy_entry(AVDictionary **dst, const AVDictionary *src, const ch return 0; } -static int dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags) -{ - char valuestr[22]; - snprintf(valuestr, sizeof(valuestr), "%"PRId64, value); - flags &= ~AV_DICT_DONT_STRDUP_VAL; - return av_dict_set(pm, key, valuestr, flags); -} - static int dash_init(AVFormatContext *s) { DASHContext *c = s->priv_data; @@ -782,8 +774,8 @@ static int dash_init(AVFormatContext *s) if (!strcmp(os->format_name, "mp4")) { av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0); } else { - dict_set_int(&opts, "cluster_time_limit", c->min_seg_duration / 1000, 0); - dict_set_int(&opts, "cluster_size_limit", 5 * 1024 * 1024, 0); // set a large cluster size limit + av_dict_set_int(&opts, "cluster_time_limit", c->min_seg_duration / 1000, 0); + av_dict_set_int(&opts, "cluster_size_limit", 5 * 1024 * 1024, 0); // set a large cluster size limit } if ((ret = avformat_write_header(ctx, &opts)) < 0) return ret;