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
8e19781e
Commit
8e19781e
authored
Mar 04, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #1404 (asf demuxer)
in some files, we don't have to skip the last padding bytes
parent
0f107443
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+10
-12
No files found.
modules/demux/asf/asf.c
View file @
8e19781e
...
...
@@ -439,7 +439,7 @@ static int DemuxPacket( demux_t *p_demux )
i_packet_send_time
=
GetDWLE
(
p_peek
+
i_skip
);
i_skip
+=
4
;
i_packet_duration
=
GetWLE
(
p_peek
+
i_skip
);
i_skip
+=
2
;
i_packet_size_left
=
i_packet_length
-
i_packet_padding_length
;
i_packet_size_left
=
i_packet_length
;
if
(
b_packet_multiple_payload
)
{
...
...
@@ -520,7 +520,8 @@ static int DemuxPacket( demux_t *p_demux )
}
else
{
i_payload_data_length
=
i_packet_length
-
i_skip
;
i_payload_data_length
=
i_packet_length
-
i_packet_padding_length
-
i_skip
;
}
if
(
i_payload_data_length
<
0
||
i_payload_data_length
>
i_packet_size_left
)
...
...
@@ -623,8 +624,13 @@ static int DemuxPacket( demux_t *p_demux )
if
(
i_packet_size_left
>
0
)
{
if
(
i_packet_size_left
>
i_packet_padding_length
)
msg_Warn
(
p_demux
,
"Didn't read %d bytes in the packet"
,
i_packet_size_left
);
i_packet_size_left
-
i_packet_padding_length
);
else
if
(
i_packet_size_left
<
i_packet_padding_length
)
msg_Warn
(
p_demux
,
"Read %d too much bytes in the packet"
,
i_packet_padding_length
-
i_packet_size_left
);
if
(
stream_Read
(
p_demux
->
s
,
NULL
,
i_packet_size_left
)
<
i_packet_size_left
)
{
...
...
@@ -633,14 +639,6 @@ static int DemuxPacket( demux_t *p_demux )
}
}
if
(
i_packet_padding_length
>
0
)
if
(
stream_Read
(
p_demux
->
s
,
NULL
,
i_packet_padding_length
)
<
i_packet_padding_length
)
{
msg_Err
(
p_demux
,
"cannot skip padding data, EOF ?"
);
return
0
;
}
return
1
;
loop_error_recovery:
...
...
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