[Ffmpeg-devel] [PATCH] av_log context
Baptiste Coudurier
baptiste.coudurier
Mon Oct 23 22:58:51 CEST 2006
Hi
Steve Lhomme wrote:
> Hi,
>
> This patch gives a better context to av_log to work with (easier to
> track modules).
>
> Steve
>
> [...]
>
> @@ -2532,22 +2532,21 @@
> else
> flags = ic->iformat->flags;
> if (flags & AVFMT_SHOW_IDS) {
> - av_log(NULL, AV_LOG_INFO, "[0x%x]", st->id);
> + av_log(ic, AV_LOG_INFO, "[0x%x]", st->id);
> }
> if (strlen(st->language) > 0) {
> - av_log(NULL, AV_LOG_INFO, "(%s)", st->language);
> + av_log(ic, AV_LOG_INFO, "(%s)", st->language);
> }
> - av_log(NULL, AV_LOG_DEBUG, ", %d/%d", st->time_base.num/g, st->time_base.den/g);
> - av_log(NULL, AV_LOG_INFO, ": %s", buf);
> + av_log(ic, AV_LOG_DEBUG, ", %d/%d", st->time_base.num/g, st->time_base.den/g);
> if(st->codec->codec_type == CODEC_TYPE_VIDEO){
> if(st->r_frame_rate.den && st->r_frame_rate.num)
> - av_log(NULL, AV_LOG_INFO, ", %5.2f fps(r)", av_q2d(st->r_frame_rate));
> + av_log(ic, AV_LOG_INFO, ", %5.2f fps(r)", av_q2d(st->r_frame_rate));
> /* else if(st->time_base.den && st->time_base.num)
> - av_log(NULL, AV_LOG_INFO, ", %5.2f fps(m)", 1/av_q2d(st->time_base));*/
> + av_log(ic, AV_LOG_INFO, ", %5.2f fps(m)", 1/av_q2d(st->time_base));*/
> else
> - av_log(NULL, AV_LOG_INFO, ", %5.2f fps(c)", 1/av_q2d(st->codec->time_base));
> + av_log(ic, AV_LOG_INFO, ", %5.2f fps(c)", 1/av_q2d(st->codec->time_base));
> }
> - av_log(NULL, AV_LOG_INFO, "\n");
> + av_log(ic, AV_LOG_INFO, ": %s\n", buf);
> }
> }
>
Is that modification wanted ? I guess not.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel
mailing list