diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-09-18 13:19:13 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-09-18 13:19:13 +0000 |
commit | e9b0681610b346adc57bcbd2f55fdd2764908097 (patch) | |
tree | 0be0a57af80361300c770c0f402e3029d8c1c01b | |
parent | ba93ea6d3e6ce95c9bc49cd69474b3b3f653babe (diff) | |
download | ffmpeg-e9b0681610b346adc57bcbd2f55fdd2764908097.tar.gz |
Only use *ic_ptr when it has been initialized.
Originally committed as revision 19911 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 4b65010967..1e8a2f4280 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -437,6 +437,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, 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 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, 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); |