diff mbox series

[FFmpeg-devel] avcodec/cdgraphics: unbreak rendering of vertical scrolling

Message ID 20211215093226.916072-1-onemda@gmail.com
State New
Headers show
Series [FFmpeg-devel] avcodec/cdgraphics: unbreak rendering of vertical scrolling | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Paul B Mahol Dec. 15, 2021, 9:32 a.m. UTC
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---

Fixed decoding of https://0x0.st/-F5w.cdg

---
 libavcodec/cdgraphics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anton Khirnov Dec. 15, 2021, 8:04 p.m. UTC | #1
Quoting Paul B Mahol (2021-12-15 10:32:26)
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
> 
> Fixed decoding of https://0x0.st/-F5w.cdg
> 
> ---
>  libavcodec/cdgraphics.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Please add a test.
diff mbox series

Patch

diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index 731d800666..c9e265fa53 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -218,7 +218,7 @@  static void cdg_scroll(CDGraphicsContext *cc, uint8_t *data,
 
     /// find the difference and save the offset for cdg_tile_block usage
     hinc = h_off - cc->hscroll;
-    vinc = v_off - cc->vscroll;
+    vinc = cc->vscroll - v_off;
     cc->hscroll = h_off;
     cc->vscroll = v_off;