Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
云duo
FFmpeg
提交
32caa7b1
F
FFmpeg
项目概览
云duo
/
FFmpeg
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FFmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
32caa7b1
编写于
11月 05, 2011
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavf: pass options from AVFormatContext to avio.
上级
9d77a8fa
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
6 deletion
+17
-6
libavformat/options.c
libavformat/options.c
+14
-3
libavformat/utils.c
libavformat/utils.c
+3
-3
未找到文件。
libavformat/options.c
浏览文件 @
32caa7b1
...
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
#include "avio_internal.h"
#include "libavutil/opt.h"
/**
...
...
@@ -40,6 +41,10 @@ static void *format_child_next(void *obj, void *prev)
((
s
->
iformat
&&
s
->
iformat
->
priv_class
)
||
s
->
oformat
&&
s
->
oformat
->
priv_class
))
return
s
->
priv_data
;
#if !FF_API_OLD_AVIO
if
(
s
->
pb
&&
s
->
pb
->
av_class
&&
prev
!=
s
->
pb
)
return
s
->
pb
;
#endif
return
NULL
;
}
...
...
@@ -59,9 +64,15 @@ static const AVClass *format_child_class_next(const AVClass *prev)
while
(
prev
&&
(
ofmt
=
av_oformat_next
(
ofmt
)))
if
(
ofmt
->
priv_class
==
prev
)
break
;
while
(
ofmt
=
av_oformat_next
(
ofmt
))
if
(
ofmt
->
priv_class
)
return
ofmt
->
priv_class
;
if
((
prev
&&
ofmt
)
||
(
!
prev
))
while
(
ofmt
=
av_oformat_next
(
ofmt
))
if
(
ofmt
->
priv_class
)
return
ofmt
->
priv_class
;
#if !FF_API_OLD_AVIO
if
(
prev
!=
&
ffio_url_class
)
return
&
ffio_url_class
;
#endif
return
NULL
;
}
...
...
libavformat/utils.c
浏览文件 @
32caa7b1
...
...
@@ -575,7 +575,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
#endif
/* open input file and probe the format if necessary */
static
int
init_input
(
AVFormatContext
*
s
,
const
char
*
filename
)
static
int
init_input
(
AVFormatContext
*
s
,
const
char
*
filename
,
AVDictionary
**
options
)
{
int
ret
;
AVProbeData
pd
=
{
filename
,
NULL
,
0
};
...
...
@@ -594,7 +594,7 @@ static int init_input(AVFormatContext *s, const char *filename)
return
0
;
if
((
ret
=
avio_open2
(
&
s
->
pb
,
filename
,
AVIO_FLAG_READ
,
&
s
->
interrupt_callback
,
NULL
))
<
0
)
&
s
->
interrupt_callback
,
options
))
<
0
)
return
ret
;
if
(
s
->
iformat
)
return
0
;
...
...
@@ -619,7 +619,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
if
((
ret
=
av_opt_set_dict
(
s
,
&
tmp
))
<
0
)
goto
fail
;
if
((
ret
=
init_input
(
s
,
filename
))
<
0
)
if
((
ret
=
init_input
(
s
,
filename
,
&
tmp
))
<
0
)
goto
fail
;
/* check filename in case an image number is expected */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录