Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f2972c8c
Commit
f2972c8c
authored
Jun 22, 2008
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use av_open_input_stream
Originally committed as revision 13871 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
381ec677
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
ffserver.c
ffserver.c
+12
-21
No files found.
ffserver.c
View file @
f2972c8c
...
...
@@ -2482,41 +2482,32 @@ static int http_receive_data(HTTPContext *c)
}
}
else
{
/* We have a header in our hands that contains useful data */
AVFormatContext
s
;
AVFormatContext
*
s
=
NULL
;
ByteIOContext
*
pb
;
AVInputFormat
*
fmt_in
;
int
i
;
memset
(
&
s
,
0
,
sizeof
(
s
));
url_open_buf
(
&
s
.
pb
,
c
->
buffer
,
c
->
buffer_end
-
c
->
buffer
,
URL_RDONLY
);
s
.
pb
->
is_streamed
=
1
;
url_open_buf
(
&
pb
,
c
->
buffer
,
c
->
buffer_end
-
c
->
buffer
,
URL_RDONLY
);
pb
->
is_streamed
=
1
;
/* use feed output format name to find corresponding input format */
fmt_in
=
av_find_input_format
(
feed
->
fmt
->
name
);
if
(
!
fmt_in
)
goto
fail
;
if
(
fmt_in
->
priv_data_size
>
0
)
{
s
.
priv_data
=
av_mallocz
(
fmt_in
->
priv_data_size
);
if
(
!
s
.
priv_data
)
goto
fail
;
}
else
s
.
priv_data
=
NULL
;
if
(
fmt_in
->
read_header
(
&
s
,
0
)
<
0
)
{
av_freep
(
&
s
.
priv_data
);
goto
fail
;
}
av_open_input_stream
(
&
s
,
pb
,
c
->
stream
->
feed_filename
,
fmt_in
,
NULL
);
/* Now we have the actual streams */
if
(
s
.
nb_streams
!=
feed
->
nb_streams
)
{
av_
freep
(
&
s
.
priv_data
);
if
(
s
->
nb_streams
!=
feed
->
nb_streams
)
{
av_
close_input_stream
(
s
);
goto
fail
;
}
for
(
i
=
0
;
i
<
s
.
nb_streams
;
i
++
)
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
memcpy
(
feed
->
streams
[
i
]
->
codec
,
s
.
streams
[
i
]
->
codec
,
sizeof
(
AVCodecContext
));
av_freep
(
&
s
.
priv_data
);
s
->
streams
[
i
]
->
codec
,
sizeof
(
AVCodecContext
));
av_close_input_stream
(
s
);
}
c
->
buffer_ptr
=
c
->
buffer
;
}
...
...
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