Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
1c1c80f0
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1c1c80f0
编写于
9月 24, 2010
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2nd try to fix av_log() repeated detection
Originally committed as revision 25174 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
7e117771
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
2 deletion
+25
-2
doc/APIchanges
doc/APIchanges
+5
-0
libavutil/avutil.h
libavutil/avutil.h
+1
-1
libavutil/log.c
libavutil/log.c
+8
-1
libavutil/log.h
libavutil/log.h
+11
-0
未找到文件。
doc/APIchanges
浏览文件 @
1c1c80f0
...
...
@@ -13,6 +13,11 @@ libavutil: 2009-03-08
API changes, most recent first:
2010-09-24 - r25174 - lavu 50.28.0 - av_log_set_flags()
Default of av_log() changed due to many problems to the old no repeat
detection. Read the docs of AV_LOG_SKIP_REPEATED in log.h before
enabling it for your app!.
2010-09-24 - r25167 - lavc 52.90.0 - av_opt_show2()
Deprecate av_opt_show() in favor or av_opt_show2().
...
...
libavutil/avutil.h
浏览文件 @
1c1c80f0
...
...
@@ -40,7 +40,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 50
#define LIBAVUTIL_VERSION_MINOR 2
7
#define LIBAVUTIL_VERSION_MINOR 2
8
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
libavutil/log.c
浏览文件 @
1c1c80f0
...
...
@@ -33,6 +33,7 @@
static
#endif
int
av_log_level
=
AV_LOG_INFO
;
static
int
flags
;
#if defined(_WIN32) && !defined(__MINGW32CE__)
#include <windows.h>
...
...
@@ -109,8 +110,9 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
if
(
!
detect_repeats
)
detect_repeats
=
isatty
(
2
)
?
1
:
-
1
;
#endif
if
(
print_prefix
&&
detect_repeats
==
1
&&
!
strcmp
(
line
,
prev
)){
if
(
print_prefix
&&
(
flags
&
AV_LOG_SKIP_REPEATED
)
&&
!
strcmp
(
line
,
prev
)){
count
++
;
if
(
detect_repeats
==
1
)
fprintf
(
stderr
,
" Last message repeated %d times
\r
"
,
count
);
return
;
}
...
...
@@ -150,6 +152,11 @@ void av_log_set_level(int level)
av_log_level
=
level
;
}
void
av_log_set_flags
(
int
arg
)
{
flags
=
arg
;
}
void
av_log_set_callback
(
void
(
*
callback
)(
void
*
,
int
,
const
char
*
,
va_list
))
{
av_log_callback
=
callback
;
...
...
libavutil/log.h
浏览文件 @
1c1c80f0
...
...
@@ -135,4 +135,15 @@ void av_log_set_callback(void (*)(void*, int, const char*, va_list));
void
av_log_default_callback
(
void
*
ptr
,
int
level
,
const
char
*
fmt
,
va_list
vl
);
const
char
*
av_default_item_name
(
void
*
ctx
);
/**
* Skip repeated messages, this requires the user app to use av_log() instead of
* (f)printf as the 2 would otherwise interfere and lead to
* "Last message repeated x times" messages below (f)printf messages with some
* bad luck.
* Also to receive the last, "last repeated" line if any, the user app must
* call av_log(NULL, AV_LOG_QUIET, ""); at the end
*/
#define AV_LOG_SKIP_REPEATED 1
void
av_log_set_flags
(
int
arg
);
#endif
/* AVUTIL_LOG_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录