Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
d8759c26
Commit
d8759c26
authored
Oct 30, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/real.c, modules/access/rtsp/*: fixes for real rtsp / demuxing.
parent
83ec5ce2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
modules/access/rtsp/real_rmff.c
modules/access/rtsp/real_rmff.c
+9
-4
modules/demux/real.c
modules/demux/real.c
+8
-11
No files found.
modules/access/rtsp/real_rmff.c
View file @
d8759c26
...
...
@@ -505,7 +505,7 @@ void rmff_fix_header(rmff_header_t *h) {
memset
(
h
->
data
,
0
,
sizeof
(
rmff_data_t
));
h
->
data
->
object_id
=
DATA_TAG
;
h
->
data
->
object_version
=
0
;
h
->
data
->
size
=
34
;
h
->
data
->
size
=
18
;
h
->
data
->
num_packets
=
0
;
h
->
data
->
next_data_header
=
0
;
}
...
...
@@ -518,7 +518,7 @@ void rmff_fix_header(rmff_header_t *h) {
if
(
h
->
fileheader
)
{
memset
(
h
->
fileheader
,
0
,
sizeof
(
rmff_fileheader_t
));
h
->
fileheader
->
object_id
=
RMF_TAG
;
h
->
fileheader
->
size
=
34
;
h
->
fileheader
->
size
=
18
;
h
->
fileheader
->
object_version
=
0
;
h
->
fileheader
->
file_version
=
0
;
h
->
fileheader
->
num_headers
=
num_headers
+
1
;
...
...
@@ -536,6 +536,9 @@ void rmff_fix_header(rmff_header_t *h) {
lprintf
(
"rmff_fix_header: setting prop.data_offset from %i to %i
\n
"
,
h
->
prop
->
data_offset
,
header_size
);
h
->
prop
->
data_offset
=
header_size
;
}
/* FIXME: I doubt this is right to do this here.
* It should belong to the demux. */
if
(
h
->
prop
->
num_packets
==
0
)
{
int
p
=
(
int
)(
h
->
prop
->
avg_bit_rate
/
8
.
0
*
(
h
->
prop
->
duration
/
1000
.
0
)
/
h
->
prop
->
avg_packet_size
);
lprintf
(
"rmff_fix_header: assuming prop.num_packets=%i
\n
"
,
p
);
...
...
@@ -545,8 +548,10 @@ void rmff_fix_header(rmff_header_t *h) {
lprintf
(
"rmff_fix_header: assuming data.num_packets=%i
\n
"
,
h
->
prop
->
num_packets
);
h
->
data
->
num_packets
=
h
->
prop
->
num_packets
;
}
lprintf
(
"rmff_fix_header: assuming data.size=%i
\n
"
,
h
->
prop
->
num_packets
*
h
->
prop
->
avg_packet_size
);
h
->
data
->
size
=
h
->
prop
->
num_packets
*
h
->
prop
->
avg_packet_size
;
if
(
h
->
data
->
size
==
18
||
!
h
->
data
->
size
)
{
lprintf
(
"rmff_fix_header: assuming data.size=%i
\n
"
,
h
->
prop
->
num_packets
*
h
->
prop
->
avg_packet_size
);
h
->
data
->
size
+=
h
->
prop
->
num_packets
*
h
->
prop
->
avg_packet_size
;
}
}
}
...
...
modules/demux/real.c
View file @
d8759c26
...
...
@@ -100,6 +100,7 @@ static int Open( vlc_object_t *p_this )
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
memset
(
p_sys
,
0
,
sizeof
(
demux_sys_t
)
);
p_sys
->
i_data_offset
=
0
;
p_sys
->
i_track
=
0
;
p_sys
->
track
=
NULL
;
...
...
@@ -175,9 +176,9 @@ static int Demux( demux_t *p_demux )
real_track_t
*
tk
=
NULL
;
vlc_bool_t
b_selected
;
if
(
p_sys
->
i_data_packets
>=
p_sys
->
i_data_packets_count
)
if
(
p_sys
->
i_data_packets
>=
p_sys
->
i_data_packets_count
&&
p_sys
->
i_data_packets_count
)
{
if
(
stream_Read
(
p_demux
->
s
,
header
,
18
)
<
18
)
{
return
0
;
...
...
@@ -602,7 +603,11 @@ static int HeaderRead( demux_t *p_demux )
msg_Dbg
(
p_demux
,
"object %4.4s size=%d version=%d"
,
(
char
*
)
&
i_id
,
i_size
,
i_version
);
if
(
i_size
<
10
)
return
VLC_EGENERIC
;
if
(
i_size
<
10
)
{
msg_Dbg
(
p_demux
,
"invalid size for object %4.4s"
,
(
char
*
)
&
i_id
);
return
VLC_EGENERIC
;
}
i_skip
=
i_size
-
10
;
if
(
i_id
==
VLC_FOURCC
(
'.'
,
'R'
,
'M'
,
'F'
)
)
...
...
@@ -923,14 +928,6 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
if
(
fmt
.
i_codec
!=
0
)
{
msg_Dbg
(
p_demux
,
" - extra data=%d"
,
fmt
.
i_extra
);
{
int
i
;
for
(
i
=
0
;
i
<
fmt
.
i_extra
;
i
++
)
{
msg_Dbg
(
p_demux
,
" data[%d] = 0x%x"
,
i
,
((
uint8_t
*
)
fmt
.
p_extra
)[
i
]
);
}
}
tk
=
malloc
(
sizeof
(
real_track_t
)
);
tk
->
i_id
=
i_num
;
...
...
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