From patchwork Fri Jan 13 12:42:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Andreas_H=C3=A5kon?= X-Patchwork-Id: 2205 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp164361vsb; Fri, 13 Jan 2017 04:43:11 -0800 (PST) X-Received: by 10.223.135.146 with SMTP id b18mr4030552wrb.189.1484311391889; Fri, 13 Jan 2017 04:43:11 -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 s64si2042668wmf.16.2017.01.13.04.43.11; Fri, 13 Jan 2017 04:43:11 -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=@protonmail.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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6902068A383; Fri, 13 Jan 2017 14:43:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail3.protonmail.ch (mail3.protonmail.ch [185.70.40.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0882568A372 for ; Fri, 13 Jan 2017 14:42:53 +0200 (EET) Received: from B09B-8 (localhost [127.0.0.1]) by mail3.protonmail.ch (Postfix) with ESMTP id 87EC38A for ; Fri, 13 Jan 2017 07:43:00 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1484311380; bh=AX8uuE0B88/6cvZtJJkKqm2YLHJQV+uW0VZ1zDqAtSg=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:Feedback-ID: From; b=da1JkWCHs5j3TfFycBzjxG8DJLeW/0rWsPTNxdXvMpjk5bh8zyJlSpZ+zqTE3F4i8 5n4tQjzGHtEkdd4n9IHeLzmSIEJrVFriAfFDb2rV3O3dUxLFGiqq39OzXjMd6E52qK V2J6iBJzQyKCONHFMN1Uiyi9Ttv5StzTKH4OQjJc= Date: Fri, 13 Jan 2017 07:42:53 -0500 To: FFmpeg development discussions and patches From: =?UTF-8?Q?Andreas_H=C3=A5kon?= Message-ID: <2DCd9K57TSBnFb8WxRbSUs3WNJziGlTrUR-Hk3ak1zLSdb3htFmvQt3fpKtIq7UHt6s55Lp0t65W53-FSogaTy_V-TGibIkAhvIOiaeczWU=@protonmail.com> In-Reply-To: References: Feedback-ID: Mx8CaiV20jk_fqXDN0fFpg3vRaGkb9VCTrYRnZNHwEija3aOdqvFspzl6ODkmHrlSKJSx29p-LzkuvS_96L02A==:Ext:ProtonMail MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=4.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail3.protonmail.ch X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: Re: [FFmpeg-devel] [PATCH 1/1] avformat: Fix Pro-MPEG non-square matrix 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi, > -------- Original Message -------- > Subject: [FFmpeg-devel] [PATCH 1/1] avformat: Fix Pro-MPEG non-square matrix > From: andreas.hakon@protonmail.com > To: FFmpeg development discussions and patches > > Hi, > > I share this for comment... > With square matrices I don't see any problem, as row=col when sending the COL FEC packets. > But, with a non-square matrix the "col_out_idx" has inconsistent values (repeat values). > > Please, review this code. I feel now is correct. > > Best, > A.H. > _______________________________________________ Incorrect mime-type in the previous e-mail. Sorry! I resend the patch in plain text... A.H. From 5b4401af5bdfe4736f5192f5dc118948f4906bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20H=C3=A5kon?= Date: Fri, 13 Jan 2017 13:07:57 +0100 Subject: [PATCH 1/1] avformat: Fix Pro-MPEG non-square matrix --- libavformat/prompeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.8.3 diff --git a/libavformat/prompeg.c b/libavformat/prompeg.c index cc1baa4..9770a91 100644 --- a/libavformat/prompeg.c +++ b/libavformat/prompeg.c @@ -432,7 +432,7 @@ static int prompeg_write(URLContext *h, const uint8_t *buf, int size) { // FEC (column) send block-aligned if (!s->first && s->packet_idx % s->d == 0) { - col_out_idx = s->packet_idx / s->l; + 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;