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
f0156a28
Commit
f0156a28
authored
Mar 13, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mmsh: more fixes.
parent
d9043cc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
modules/access/mms/mmsh.c
modules/access/mms/mmsh.c
+19
-3
No files found.
modules/access/mms/mmsh.c
View file @
f0156a28
...
@@ -412,7 +412,15 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
...
@@ -412,7 +412,15 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
while
(
i_data
<
i_len
)
while
(
i_data
<
i_len
)
{
{
if
(
p_sys
->
i_packet_used
<
p_sys
->
i_packet_length
)
if
(
p_sys
->
i_pos
<
p_sys
->
i_header
)
{
i_copy
=
__MIN
(
p_sys
->
i_header
-
p_sys
->
i_pos
,
i_len
-
i_data
);
memcpy
(
&
p_buffer
[
i_data
],
p_sys
->
p_header
,
i_copy
);
i_data
+=
i_copy
;
p_sys
->
i_pos
+=
i_copy
;
}
else
if
(
p_sys
->
i_packet_used
<
p_sys
->
i_packet_length
)
{
{
i_copy
=
__MIN
(
p_sys
->
i_packet_length
-
p_sys
->
i_packet_used
,
i_copy
=
__MIN
(
p_sys
->
i_packet_length
-
p_sys
->
i_packet_used
,
i_len
-
i_data
);
i_len
-
i_data
);
...
@@ -423,6 +431,7 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
...
@@ -423,6 +431,7 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
i_data
+=
i_copy
;
i_data
+=
i_copy
;
p_sys
->
i_packet_used
+=
i_copy
;
p_sys
->
i_packet_used
+=
i_copy
;
p_sys
->
i_pos
+=
i_copy
;
}
}
else
if
(
p_sys
->
i_pos
+
i_data
>
p_sys
->
i_header
&&
else
if
(
p_sys
->
i_pos
+
i_data
>
p_sys
->
i_header
&&
(
int
)
p_sys
->
i_packet_used
<
p_sys
->
asfh
.
i_min_data_packet_size
)
(
int
)
p_sys
->
i_packet_used
<
p_sys
->
asfh
.
i_min_data_packet_size
)
...
@@ -434,6 +443,7 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
...
@@ -434,6 +443,7 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
i_data
+=
i_copy
;
i_data
+=
i_copy
;
p_sys
->
i_packet_used
+=
i_copy
;
p_sys
->
i_packet_used
+=
i_copy
;
p_sys
->
i_pos
+=
i_copy
;
}
}
else
else
{
{
...
@@ -442,11 +452,14 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
...
@@ -442,11 +452,14 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
{
{
return
-
1
;
return
-
1
;
}
}
if
(
ck
.
i_type
==
0x4824
)
{
p_sys
->
i_packet_used
=
0
;
p_sys
->
i_packet_length
=
0
;
}
}
}
}
}
p_sys
->
i_pos
+=
i_data
;
return
(
i_data
);
return
(
i_data
);
}
}
...
@@ -567,6 +580,9 @@ static int Start( input_thread_t *p_input, off_t i_pos )
...
@@ -567,6 +580,9 @@ static int Start( input_thread_t *p_input, off_t i_pos )
free
(
psz
);
free
(
psz
);
}
}
p_sys
->
i_packet_used
=
0
;
p_sys
->
i_packet_length
=
0
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
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