From patchwork Tue Jun 9 15:06:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 20248 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 782FE44AB97 for ; Tue, 9 Jun 2020 18:06:21 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 55E9768B421; Tue, 9 Jun 2020 18:06:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 783A368AA12 for ; Tue, 9 Jun 2020 18:06:14 +0300 (EEST) Received: by mail-pg1-f196.google.com with SMTP id n23so10396023pgb.12 for ; Tue, 09 Jun 2020 08:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=cL6vYlEer6QdK8kjRxqwF9nTgoEGEZ3TDERBzDTed2w=; b=S+4LeGkFhkLq+Lj6iVNXrr+VPB6NjcljB8veeBoE2AV1U2ZQbDXPkYFbi8YhSzyABk OpasnEwHrhOE8O7CZ+EM9gmQSGaKiMDnYsZI04KPapDl4LVZDYgtZM0+gd6FijX6eUfH eChYTCyMF3sRNuEwCVrPLUaiOHoVYDen70WD/lTxQztSmT0jhfHF7GduUklI0CnulqmC Td98/81euFaz7UD9D180ncPwoDCQ4EiOFh2lHHCZ6BSDbSCLNahPgGdrRLXsXlea/k+R C/825D7pwF22jqiuNopwpHvTAsMLexo1c/o+GuCU5mz+Z++fWmiUyGPwfMpN0wv7wC6Q C9vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cL6vYlEer6QdK8kjRxqwF9nTgoEGEZ3TDERBzDTed2w=; b=N6XCGoHa0ksiHKESIiGgf+Dx9nRmQTM1zgbbNybHfe7LU+rn9XEpa019YBQIJnydpC gPU1eVuHeCNQBUMx7qEWxBeNvLfBDVI2gRXZ3dwjp+l5xDWFzLlbJIDNq3OvxuozyvWA Sbpl69HMbfOQ8/JD5/vWL9sP7nQEhPEwSkAROAEtRrzAhsmezforba/AJaxDU6wJBa1c wxjmgd/do6vEwK7NOnH2t4oKYxrbLvEnTCAFol2OXVZinilUZ7Fw084gLTW+smSvsO/w 9+Oyt/rmsXVpdN8BWWQsop3EkiXroaebOQb8bFv2DVqgpgDRUBjVEXj3nAlLOKnY78qW u8WA== X-Gm-Message-State: AOAM531j6TuOlmckr0wdBH7+BlJjs95ZodsCKJ+QM6cl/ct3UFe5GgH0 9EemCHxojlvqpFyVMiYabY9taVeC X-Google-Smtp-Source: ABdhPJytGNKqXNiyt4h5XsM7Rf5rJ9WS4enKcUpjNKCMkV5C3NuXYQwJR6+u/hbZuR+MqAhwBmhxNQ== X-Received: by 2002:aa7:8b56:: with SMTP id i22mr25690235pfd.63.1591715171349; Tue, 09 Jun 2020 08:06:11 -0700 (PDT) Received: from localhost.localdomain ([49.51.162.193]) by smtp.gmail.com with ESMTPSA id l23sm8726524pgc.55.2020.06.09.08.06.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 08:06:10 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Tue, 9 Jun 2020 23:06:00 +0800 Message-Id: <1591715161-11246-1-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [FFmpeg-devel] [PATCH v2 1/2] lavu/internal: Fix comment for avpriv_dict_set_timestamp 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: Jun Zhao MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Jun Zhao Fix comment for avpriv_dict_set_timestamp from b72a7b96f84 Signed-off-by: Jun Zhao --- libavutil/internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/internal.h b/libavutil/internal.h index 4acbcf5..373a662 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -353,7 +353,8 @@ void ff_check_pixfmt_descriptors(void); /** * Set a dictionary value to an ISO-8601 compliant timestamp string. * - * @param s AVFormatContext + * @param dict pointer to a pointer to a dictionary struct. If *dict is NULL + * a dictionary struct is allocated and put in *dict. * @param key metadata key * @param timestamp unix timestamp in microseconds * @return <0 on error From patchwork Tue Jun 9 15:06:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 20249 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 6A18844AB97 for ; Tue, 9 Jun 2020 18:06:23 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 550EE68B448; Tue, 9 Jun 2020 18:06:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9789168B436 for ; Tue, 9 Jun 2020 18:06:16 +0300 (EEST) Received: by mail-pl1-f195.google.com with SMTP id n9so8165117plk.1 for ; Tue, 09 Jun 2020 08:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AY2RijgyAJ+C5VVyEUmOo9OpCxlOj12mfedrwl38U+M=; b=CiT9x+yj/KZekLsSjEbmFKEkTJvZxzdFSpdrkANYutGLSMDJ33rnQ5lADTUD63GJsa vMKL0esRQq3sjXMssctL7gNf6Eq5NyneCU7CpUztsUST/DUVwqSyBa7a2QV9drqhbCT8 DV2DB89hG1MKibwxX2Jaq9q8yHZaqtIFDEaZ+gKJ+rzIxyGE8jFoImNs3GMx/pLVePoJ 5rNe/DzSiYU/VdXzsDW9/FYIeGpRUvpP6b2B+4vVFvbaI2VTAEszpGXPyzFYf+uAzavP refeVCprWx9oofQmE/7pOZ6cvqUF84wjFM3H1CYyeU1+MXWtLiZNBgKZ3ka1sI2PiIFQ l86A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AY2RijgyAJ+C5VVyEUmOo9OpCxlOj12mfedrwl38U+M=; b=A5LlfDqFAlree3Lq7ym9fFnCtcXDN44ndk/0/0+FhAtwwG1iayBsROK8XAZf06uHYU Z3h09K5kJBpZHgWUFeL9gUgOCw41aic0aa1EXI+vMQRS3YGg/ECIphazPcF/I/ynmI+r mBfnPAUqNGqX4Wmew2j7isonvsqDFhMoqXxepkEYzuKFlkHqoLawvQiUny3kwCY7uXJd +gX2ye6devt3IzAmRyvnrUKm4I2WarDEXCfXt5GKXXvPbB4YPP8ePNCrne5GgNxaWEB2 clW4Fd1ZGThBtko7YLi1v3NgPs7gsZJyX2aPbddXISnmknvR/hz/Es0RbBhOrqqSd2ec pEPw== X-Gm-Message-State: AOAM531Vba2yduDSjn+vTUAsUWIqyH3P72/2bhDW9WPyNXkCqh721Y24 nW9G9gxmk38EuhtSnqTLHRhXSS74 X-Google-Smtp-Source: ABdhPJzRaPJ11nE3L2ZMV89Gvqrry0NsJ6FLRKxW3pIj03n5fYP6u5NTQpgcEr96JqM85t1G1boACw== X-Received: by 2002:a17:902:7487:: with SMTP id h7mr3770687pll.155.1591715174447; Tue, 09 Jun 2020 08:06:14 -0700 (PDT) Received: from localhost.localdomain ([49.51.162.193]) by smtp.gmail.com with ESMTPSA id l23sm8726524pgc.55.2020.06.09.08.06.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 08:06:13 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Tue, 9 Jun 2020 23:06:01 +0800 Message-Id: <1591715161-11246-2-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591715161-11246-1-git-send-email-mypopydev@gmail.com> References: <1591715161-11246-1-git-send-email-mypopydev@gmail.com> Subject: [FFmpeg-devel] [PATCH v2 2/2] lavf/prompeg: prompeg_write() must report data all was written 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: David Holroyd MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: David Holroyd Previously, prompeg_write() would only report to caller that bytes we written when a FEC packet was actually created. Not all RTP packets are expected to generate a FEC packet however, so this behavior was causing avio to retry writing the RTP packet, eventually forcing the FEC state machine to send a FEC packet erroneously (and so breaking out of the retry loop). This was resulting in incorrect FEC data being generated, and far too many FEC packets to be sent (~100% FEC overhead). fix #7863 Signed-off-by: David Holroyd --- libavformat/prompeg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/prompeg.c b/libavformat/prompeg.c index 7b2e5e8..59faa82 100644 --- a/libavformat/prompeg.c +++ b/libavformat/prompeg.c @@ -387,7 +387,7 @@ static int prompeg_write(URLContext *h, const uint8_t *buf, int size) { PrompegFec *fec_tmp; uint8_t *bitstring = NULL; int col_idx, col_out_idx, row_idx; - int ret, written = 0; + int ret = 0; if (s->init && ((ret = prompeg_init(h, buf, size)) < 0)) goto end; @@ -403,7 +403,6 @@ static int prompeg_write(URLContext *h, const uint8_t *buf, int size) { if (!s->first || s->packet_idx > 0) { if ((ret = prompeg_write_fec(h, s->fec_row, PROMPEG_FEC_ROW)) < 0) goto end; - written += ret; } memcpy(s->fec_row->bitstring, bitstring, s->bitstring_size); s->fec_row->sn = AV_RB16(buf + 2); @@ -434,7 +433,6 @@ static int prompeg_write(URLContext *h, const uint8_t *buf, int size) { col_out_idx = s->packet_idx / s->d; if ((ret = prompeg_write_fec(h, s->fec_col[col_out_idx], PROMPEG_FEC_COL)) < 0) goto end; - written += ret; } if (++s->packet_idx >= s->packet_idx_max) { @@ -443,7 +441,7 @@ static int prompeg_write(URLContext *h, const uint8_t *buf, int size) { s->first = 0; } - ret = written; + ret = size; end: av_free(bitstring);