diff mbox

[FFmpeg-devel,1/1] avformat: Fix Pro-MPEG non-square matrix

Message ID 2DCd9K57TSBnFb8WxRbSUs3WNJziGlTrUR-Hk3ak1zLSdb3htFmvQt3fpKtIq7UHt6s55Lp0t65W53-FSogaTy_V-TGibIkAhvIOiaeczWU=@protonmail.com
State Superseded
Headers show

Commit Message

Andreas HÃ¥kon Jan. 13, 2017, 12:42 p.m. UTC
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 <ffmpeg-devel@ffmpeg.org>
>
> 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?= <andreas.hakon@protonmail.com>
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 mbox

Patch

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;