[Ffmpeg-devel] [PATCH] av_log context

Benjamin Larsson banan
Mon Oct 23 22:12:05 CEST 2006


Steve Lhomme wrote:

> Hi,
>
> This patch gives a better context to av_log to work with (easier to
> track modules).
>
> Steve
>
>------------------------------------------------------------------------
>
>Index: libavcodec/cook.c
>===================================================================
>--- libavcodec/cook.c	(revision 6775)
>+++ libavcodec/cook.c	(working copy)
>@@ -1280,16 +1280,16 @@
> 
>     /* Try to catch some obviously faulty streams, othervise it might be exploitable */
>     if (q->total_subbands > 53) {
>-        av_log(NULL,AV_LOG_ERROR,"total_subbands > 53, report sample!\n");
>+        av_log(avctx,AV_LOG_ERROR,"total_subbands > 53, report sample!\n");
>         return -1;
>     }
>     if (q->subbands > 50) {
>-        av_log(NULL,AV_LOG_ERROR,"subbands > 50, report sample!\n");
>+        av_log(avctx,AV_LOG_ERROR,"subbands > 50, report sample!\n");
>         return -1;
>     }
>     if ((q->samples_per_channel == 256) || (q->samples_per_channel == 512) || (q->samples_per_channel == 1024)) {
>     } else {
>-        av_log(NULL,AV_LOG_ERROR,"unknown amount of samples_per_channel = %d, report sample!\n",q->samples_per_channel);
>+        av_log(avctx,AV_LOG_ERROR,"unknown amount of samples_per_channel = %d, report sample!\n",q->samples_per_channel);
>         return -1;
>     }
> 
>  
>

This is ok.

MvH
Benjamin Larsson

-- 
new tiny signature





More information about the ffmpeg-devel mailing list