[01/10] 4xm: use the correct logging context

Message ID 1370619933-11844-2-git-send-email-lu_zero@gentoo.org
State Old
Headers show

Commit Message

Luca Barbato June 7, 2013, 3:45 p.m.
---
 libavcodec/4xm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kostya Shishkov June 7, 2013, 7:13 p.m. | #1
On Fri, Jun 07, 2013 at 05:45:24PM +0200, Luca Barbato wrote:
> ---
>  libavcodec/4xm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
> index fd03134..71fe3f2 100644
> --- a/libavcodec/4xm.c
> +++ b/libavcodec/4xm.c
> @@ -670,9 +670,9 @@ static int decode_i2_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf,
>              color[1] = bytestream2_get_le16u(&g3);
>  
>              if (color[0] & 0x8000)
> -                av_log(NULL, AV_LOG_ERROR, "unk bit 1\n");
> +                av_log(f->avctx, AV_LOG_ERROR, "unk bit 1\n");
>              if (color[1] & 0x8000)
> -                av_log(NULL, AV_LOG_ERROR, "unk bit 2\n");
> +                av_log(f->avctx, AV_LOG_ERROR, "unk bit 2\n");
>  
>              color[2] = mix(color[0], color[1]);
>              color[3] = mix(color[1], color[0]);
> -- 

looks OK

Patch

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index fd03134..71fe3f2 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -670,9 +670,9 @@  static int decode_i2_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf,
             color[1] = bytestream2_get_le16u(&g3);
 
             if (color[0] & 0x8000)
-                av_log(NULL, AV_LOG_ERROR, "unk bit 1\n");
+                av_log(f->avctx, AV_LOG_ERROR, "unk bit 1\n");
             if (color[1] & 0x8000)
-                av_log(NULL, AV_LOG_ERROR, "unk bit 2\n");
+                av_log(f->avctx, AV_LOG_ERROR, "unk bit 2\n");
 
             color[2] = mix(color[0], color[1]);
             color[3] = mix(color[1], color[0]);