# HG changeset patch # User michael # Date 1253279953 0 # Node ID 8ef96c47c19ec8187f9b059301d25761afc88d35 # Parent 3fab66935e56d01a0199d420078aed5e8d0dd127 Only use *ic_ptr when it has been initialized. diff -r 3fab66935e56 -r 8ef96c47c19e utils.c --- a/utils.c Fri Sep 18 13:18:47 2009 +0000 +++ b/utils.c Fri Sep 18 13:19:13 2009 +0000 @@ -437,6 +437,7 @@ int err, probe_size; AVProbeData probe_data, *pd = &probe_data; ByteIOContext *pb = NULL; + void *logctx= ap && ap->prealloced_context ? *ic_ptr : NULL; pd->filename = ""; if (filename) @@ -478,9 +479,9 @@ fmt = av_probe_input_format2(pd, 1, &score); if(fmt){ if(score <= AVPROBE_SCORE_MAX/4){ //this can only be true in the last iteration - av_log(*ic_ptr, AV_LOG_WARNING, "Format detected only with low score of %d, misdetection possible!\n", score); + av_log(logctx, AV_LOG_WARNING, "Format detected only with low score of %d, misdetection possible!\n", score); }else - av_log(*ic_ptr, AV_LOG_DEBUG, "Probed with size=%d and score=%d\n", probe_size, score); + av_log(logctx, AV_LOG_DEBUG, "Probed with size=%d and score=%d\n", probe_size, score); } } av_freep(&pd->buf);