diff mbox series

[FFmpeg-devel] libavcodec/ansi: fix ECMA-48 SGR parameter 49

Message ID 50644e0d-4a30-b492-cdc1-2b37b2b297c1@gmx.de
State New
Headers show
Series [FFmpeg-devel] libavcodec/ansi: fix ECMA-48 SGR parameter 49 | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Jonas Lindner July 9, 2023, 10:06 p.m. UTC
As can be seen in man console_codes this parameter sets the default
background color

Signed-off-by: Jonas Lindner <jolindner@gmx.de>
---
  libavcodec/ansi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

              }
--
2.34.1

Comments

Peter Ross July 11, 2023, 11:24 p.m. UTC | #1
On Mon, Jul 10, 2023 at 12:06:33AM +0200, Jonas Lindner wrote:
> As can be seen in man console_codes this parameter sets the default
> background color
> 
> Signed-off-by: Jonas Lindner <jolindner@gmx.de>
> ---
>  libavcodec/ansi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
> index 49c3770c4c..d8d32bafbd 100644
> --- a/libavcodec/ansi.c
> +++ b/libavcodec/ansi.c
> @@ -330,7 +330,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
>                  s->bg = index < 16 ? ansi_to_cga[index] : index;
>                  i += 2;
>              } else if (m == 49) {
> -                s->fg = ansi_to_cga[DEFAULT_BG_COLOR];
> +                s->bg = ansi_to_cga[DEFAULT_BG_COLOR];

Well spotted. Applied.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
diff mbox series

Patch

diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index 49c3770c4c..d8d32bafbd 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -330,7 +330,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
                  s->bg = index < 16 ? ansi_to_cga[index] : index;
                  i += 2;
              } else if (m == 49) {
-                s->fg = ansi_to_cga[DEFAULT_BG_COLOR];
+                s->bg = ansi_to_cga[DEFAULT_BG_COLOR];
              } else {
                  avpriv_request_sample(avctx, "Unsupported rendition
parameter");