Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
32caa7b1
Commit
32caa7b1
authored
Nov 05, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: pass options from AVFormatContext to avio.
parent
9d77a8fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
options.c
libavformat/options.c
+14
-3
utils.c
libavformat/utils.c
+3
-3
No files found.
libavformat/options.c
View file @
32caa7b1
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
#include "avformat.h"
#include "avformat.h"
#include "avio_internal.h"
#include "libavutil/opt.h"
#include "libavutil/opt.h"
/**
/**
...
@@ -40,6 +41,10 @@ static void *format_child_next(void *obj, void *prev)
...
@@ -40,6 +41,10 @@ static void *format_child_next(void *obj, void *prev)
((
s
->
iformat
&&
s
->
iformat
->
priv_class
)
||
((
s
->
iformat
&&
s
->
iformat
->
priv_class
)
||
s
->
oformat
&&
s
->
oformat
->
priv_class
))
s
->
oformat
&&
s
->
oformat
->
priv_class
))
return
s
->
priv_data
;
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
;
return
NULL
;
}
}
...
@@ -59,9 +64,15 @@ static const AVClass *format_child_class_next(const AVClass *prev)
...
@@ -59,9 +64,15 @@ static const AVClass *format_child_class_next(const AVClass *prev)
while
(
prev
&&
(
ofmt
=
av_oformat_next
(
ofmt
)))
while
(
prev
&&
(
ofmt
=
av_oformat_next
(
ofmt
)))
if
(
ofmt
->
priv_class
==
prev
)
if
(
ofmt
->
priv_class
==
prev
)
break
;
break
;
while
(
ofmt
=
av_oformat_next
(
ofmt
))
if
((
prev
&&
ofmt
)
||
(
!
prev
))
if
(
ofmt
->
priv_class
)
while
(
ofmt
=
av_oformat_next
(
ofmt
))
return
ofmt
->
priv_class
;
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
;
return
NULL
;
}
}
...
...
libavformat/utils.c
View file @
32caa7b1
...
@@ -575,7 +575,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
...
@@ -575,7 +575,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
#endif
#endif
/* open input file and probe the format if necessary */
/* 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
;
int
ret
;
AVProbeData
pd
=
{
filename
,
NULL
,
0
};
AVProbeData
pd
=
{
filename
,
NULL
,
0
};
...
@@ -594,7 +594,7 @@ static int init_input(AVFormatContext *s, const char *filename)
...
@@ -594,7 +594,7 @@ static int init_input(AVFormatContext *s, const char *filename)
return
0
;
return
0
;
if
((
ret
=
avio_open2
(
&
s
->
pb
,
filename
,
AVIO_FLAG_READ
,
if
((
ret
=
avio_open2
(
&
s
->
pb
,
filename
,
AVIO_FLAG_READ
,
&
s
->
interrupt_callback
,
NULL
))
<
0
)
&
s
->
interrupt_callback
,
options
))
<
0
)
return
ret
;
return
ret
;
if
(
s
->
iformat
)
if
(
s
->
iformat
)
return
0
;
return
0
;
...
@@ -619,7 +619,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
...
@@ -619,7 +619,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
if
((
ret
=
av_opt_set_dict
(
s
,
&
tmp
))
<
0
)
if
((
ret
=
av_opt_set_dict
(
s
,
&
tmp
))
<
0
)
goto
fail
;
goto
fail
;
if
((
ret
=
init_input
(
s
,
filename
))
<
0
)
if
((
ret
=
init_input
(
s
,
filename
,
&
tmp
))
<
0
)
goto
fail
;
goto
fail
;
/* check filename in case an image number is expected */
/* check filename in case an image number is expected */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment