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
8e1340ab
Commit
8e1340ab
authored
Jan 12, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avserver: fix build after the next bump.
parent
a85ce653
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
avserver.c
avserver.c
+12
-10
No files found.
avserver.c
View file @
8e1340ab
...
...
@@ -26,13 +26,16 @@
#include <string.h>
#include <stdlib.h>
#include "libavformat/avformat.h"
// FIXME those are internal headers, avserver _really_ shouldn't use them
#include "libavformat/ffm.h"
#include "libavformat/network.h"
#include "libavformat/os_support.h"
#include "libavformat/rtpdec.h"
#include "libavformat/rtsp.h"
// XXX for ffio_open_dyn_packet_buffer, to be removed
#include "libavformat/avio_internal.h"
#include "libavformat/internal.h"
#include "libavformat/url.h"
#include "libavutil/avstring.h"
#include "libavutil/lfg.h"
#include "libavutil/dict.h"
...
...
@@ -867,7 +870,7 @@ static void close_connection(HTTPContext *c)
}
h
=
c
->
rtp_handles
[
i
];
if
(
h
)
url_close
(
h
);
ff
url_close
(
h
);
}
ctx
=
&
c
->
fmt_ctx
;
...
...
@@ -2248,7 +2251,6 @@ static int http_prepare_data(HTTPContext *c)
* Default value from Libav
* Try to set it use configuration option
*/
c
->
fmt_ctx
.
preload
=
(
int
)(
0
.
5
*
AV_TIME_BASE
);
c
->
fmt_ctx
.
max_delay
=
(
int
)(
0
.
7
*
AV_TIME_BASE
);
if
(
avformat_write_header
(
&
c
->
fmt_ctx
,
NULL
)
<
0
)
{
...
...
@@ -2367,7 +2369,7 @@ static int http_prepare_data(HTTPContext *c)
if
(
c
->
rtp_protocol
==
RTSP_LOWER_TRANSPORT_TCP
)
max_packet_size
=
RTSP_TCP_MAX_PACKET_SIZE
;
else
max_packet_size
=
url_get_max_packet_size
(
c
->
rtp_handles
[
c
->
packet_stream_index
])
;
max_packet_size
=
c
->
rtp_handles
[
c
->
packet_stream_index
]
->
max_packet_size
;
ret
=
ffio_open_dyn_packet_buf
(
&
ctx
->
pb
,
max_packet_size
);
}
else
{
ret
=
avio_open_dyn_buf
(
&
ctx
->
pb
);
...
...
@@ -2520,8 +2522,8 @@ static int http_send_data(HTTPContext *c)
}
else
{
/* send RTP packet directly in UDP */
c
->
buffer_ptr
+=
4
;
url_write
(
c
->
rtp_handles
[
c
->
packet_stream_index
],
c
->
buffer_ptr
,
len
);
ff
url_write
(
c
->
rtp_handles
[
c
->
packet_stream_index
],
c
->
buffer_ptr
,
len
);
c
->
buffer_ptr
+=
len
;
/* here we continue as we can send several packets per 10 ms slot */
}
...
...
@@ -3404,10 +3406,10 @@ static int rtp_new_av_stream(HTTPContext *c,
"rtp://%s:%d"
,
ipaddr
,
ntohs
(
dest_addr
->
sin_port
));
}
if
(
url_open
(
&
h
,
ctx
->
filename
,
AVIO_FLAG_WRITE
)
<
0
)
if
(
ffurl_open
(
&
h
,
ctx
->
filename
,
AVIO_FLAG_WRITE
,
NULL
,
NULL
)
<
0
)
goto
fail
;
c
->
rtp_handles
[
stream_index
]
=
h
;
max_packet_size
=
url_get_max_packet_size
(
h
)
;
max_packet_size
=
h
->
max_packet_size
;
break
;
case
RTSP_LOWER_TRANSPORT_TCP
:
/* RTP/TCP case */
...
...
@@ -3430,7 +3432,7 @@ static int rtp_new_av_stream(HTTPContext *c,
if
(
avformat_write_header
(
ctx
,
NULL
)
<
0
)
{
fail:
if
(
h
)
url_close
(
h
);
ff
url_close
(
h
);
av_free
(
ctx
);
return
-
1
;
}
...
...
@@ -3467,7 +3469,7 @@ static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int cop
}
fst
->
priv_data
=
av_mallocz
(
sizeof
(
FeedData
));
fst
->
index
=
stream
->
nb_streams
;
av_set_pts_info
(
fst
,
33
,
1
,
90000
);
av
priv
_set_pts_info
(
fst
,
33
,
1
,
90000
);
fst
->
sample_aspect_ratio
=
codec
->
sample_aspect_ratio
;
stream
->
streams
[
stream
->
nb_streams
++
]
=
fst
;
return
fst
;
...
...
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