Mercurial > libavformat.hg
changeset 5222:8ef96c47c19e libavformat
Only use *ic_ptr when it has been initialized.
author | michael |
---|---|
date | Fri, 18 Sep 2009 13:19:13 +0000 |
parents | 3fab66935e56 |
children | bed5288e1fad |
files | utils.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);