av_log(ic, AV_LOG_DEBUG, ": %s\n", buf);
av_log(NULL, AV_LOG_DEBUG, ": %s\n", buf);
void dump_format(AVFormatContext *ic,                 int index,                  const char *url,                 int is_output){    int i, flags;    char buf[256];    av_log(ic, AV_LOG_DEBUG, "%s #%d, %s, %s '%s':\n",             is_output ? "Output" : "Input",            index,             is_output ? ic->oformat->name : ic->iformat->name,             is_output ? "to" : "from", url);    if (!is_output) {        av_log(ic, AV_LOG_DEBUG, "  Duration: ");        if (ic->duration != AV_NOPTS_VALUE) {            int hours, mins, secs, us;            secs = ic->duration / AV_TIME_BASE;            us = ic->duration % AV_TIME_BASE;            mins = secs / 60;            secs %= 60;            hours = mins / 60;            mins %= 60;            av_log(ic, AV_LOG_DEBUG, "%02d:%02d:%02d.%01d", hours, mins, secs,                    (10 * us) / AV_TIME_BASE);        } else {            av_log(ic, AV_LOG_DEBUG, "N/A");        }        av_log(ic, AV_LOG_DEBUG, ", bitrate: ");        if (ic->bit_rate) {            av_log(ic, AV_LOG_DEBUG,"%d kb/s", ic->bit_rate / 1000);        } else {            av_log(ic, AV_LOG_DEBUG, "N/A");        }        av_log(ic, AV_LOG_DEBUG, "\n");    }    for(i=0;i<ic->nb_streams;i++) {        AVStream *st = ic->streams[i];        avcodec_string(buf, sizeof(buf), &st->codec, is_output);        av_log(ic, AV_LOG_DEBUG, "  Stream #%d.%d", index, i);        /* the pid is an important information, so we display it */        /* XXX: add a generic system */        if (is_output)            flags = ic->oformat->flags;        else            flags = ic->iformat->flags;        if (flags & AVFMT_SHOW_IDS) {            av_log(ic, AV_LOG_DEBUG, "[0x%x]", st->id);        }        av_log(ic, AV_LOG_DEBUG, ": %s\n", buf);    }}