[Ffmpeg-devel] [PATCH] av_log context
Steve Lhomme
slhomme
Wed Nov 1 21:34:17 CET 2006
Baptiste Coudurier wrote:
> 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.
If not you can always split the patch in two and apply the "wanted"
part. Then we can discuss the sensitive part.
Steve
More information about the ffmpeg-devel
mailing list