From patchwork Wed Dec 25 21:43:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 16951 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 9AFA2449BB5 for ; Wed, 25 Dec 2019 23:44:50 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C4D068AA81; Wed, 25 Dec 2019 23:44:50 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 14F9368ABF3 for ; Wed, 25 Dec 2019 23:44:48 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id D3E48E3C9D; Wed, 25 Dec 2019 22:44:48 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rqK6FbpUuMVV; Wed, 25 Dec 2019 22:44:46 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 8B1EDE3478; Wed, 25 Dec 2019 22:44:46 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Wed, 25 Dec 2019 22:43:09 +0100 Message-Id: <20191225214314.15879-8-cus@passwd.hu> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191225214314.15879-1-cus@passwd.hu> References: <20191225214314.15879-1-cus@passwd.hu> Subject: [FFmpeg-devel] [PATCH 08/13] avformat/tee: use AV_OPT_TYPE_DICT for fifo_options 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: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- libavformat/tee.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index d91993354b..56669d9d8e 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -56,7 +56,6 @@ typedef struct TeeContext { TeeSlave *slaves; int use_fifo; AVDictionary *fifo_options; - char *fifo_options_str; } TeeContext; static const char *const slave_delim = "|"; @@ -67,8 +66,8 @@ static const char *const slave_select_sep = ","; static const AVOption options[] = { {"use_fifo", "Use fifo pseudo-muxer to separate actual muxers from encoder", OFFSET(use_fifo), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, - {"fifo_options", "fifo pseudo-muxer options", OFFSET(fifo_options_str), - AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM}, + {"fifo_options", "fifo pseudo-muxer options", OFFSET(fifo_options), + AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM}, {NULL} }; @@ -475,12 +474,6 @@ static int tee_write_header(AVFormatContext *avf) filename++; } - if (tee->fifo_options_str) { - ret = av_dict_parse_string(&tee->fifo_options, tee->fifo_options_str, "=", ":", 0); - if (ret < 0) - goto fail; - } - if (!(tee->slaves = av_mallocz_array(nb_slaves, sizeof(*tee->slaves)))) { ret = AVERROR(ENOMEM); goto fail;