From f2ea43a808a7f23093b318e6400c67690f2c026b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Tue, 2 Mar 2021 15:11:57 +0000 Subject: [PATCH] matroska: fix refblock handling --- matroska.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/matroska.c b/matroska.c index 8041f8c..681f601 100644 --- a/matroska.c +++ b/matroska.c @@ -243,11 +243,10 @@ matroskarun(Biobuf *f) if(off >= bgend && !skipdata){ if(npackets > 0){ - if(te.fpacket(&out, &te, packets, npackets, ts, key || refblock) != 0) + if(te.fpacket(&out, &te, packets, npackets, ts, key || !refblock) != 0) goto err; npackets = 0; } - refblock = 0; } n = ebmlel(f, left, &el, &sz); @@ -311,7 +310,7 @@ matroskarun(Biobuf *f) continue; }else if(el.id == EBlockGroup && !skipdata){ refblock = 0; - bgend = off+sz; + bgend = off+n+sz; npackets = 0; continue; }else if((el.id == ESimpleBlock || el.id == EBlock) && !skipdata){ -- 2.45.2