Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
9f9e9578
Commit
9f9e9578
authored
Aug 10, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in System End Code handling. Contact me in case of problem.
parent
20ff5191
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
38 deletions
+57
-38
plugins/mpeg/input_ps.c
plugins/mpeg/input_ps.c
+57
-38
No files found.
plugins/mpeg/input_ps.c
View file @
9f9e9578
...
...
@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ps.c,v 1.3
2 2001/08/07 02:48:25 sam
Exp $
* $Id: input_ps.c,v 1.3
3 2001/08/10 16:38:09 massiot
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
...
...
@@ -470,7 +470,7 @@ static int PSRead( input_thread_t * p_input,
for
(
i_packet
=
0
;
i_packet
<
INPUT_READ_ONCE
;
i_packet
++
)
{
/* Read what we believe to be a packet header. */
if
(
(
i_error
=
SafeRead
(
p_input
,
p_header
,
6
))
)
if
(
(
i_error
=
SafeRead
(
p_input
,
p_header
,
4
))
)
{
return
(
i_error
);
}
...
...
@@ -504,11 +504,16 @@ static int PSRead( input_thread_t * p_input,
}
/* Packet found. */
*
(
u32
*
)
p_header
=
U32_AT
(
&
i_startcode
);
}
/* 0x1B9 == SYSTEM_END_CODE, it is only 4 bytes long. */
if
(
U32_AT
(
p_header
)
!=
0x1B9
)
{
/* The packet is at least 6 bytes long. */
if
(
(
i_error
=
SafeRead
(
p_input
,
p_header
+
4
,
2
))
)
{
return
(
i_error
);
}
}
if
(
U32_AT
(
p_header
)
!=
0x1BA
)
{
...
...
@@ -534,6 +539,12 @@ static int PSRead( input_thread_t * p_input,
return
(
-
1
);
}
}
}
else
{
/* System End Code */
i_packet_size
=
-
2
;
}
/* Fetch a packet of the appropriate size. */
p_data
=
NewPacket
(
p_input
->
p_method_data
,
i_packet_size
+
6
);
...
...
@@ -543,6 +554,8 @@ static int PSRead( input_thread_t * p_input,
return
(
-
1
);
}
if
(
U32_AT
(
p_header
)
!=
0x1B9
)
{
/* Copy the header we already read. */
memcpy
(
p_data
->
p_buffer
,
p_header
,
6
);
...
...
@@ -567,6 +580,12 @@ static int PSRead( input_thread_t * p_input,
}
}
}
}
else
{
/* Copy the small header. */
memcpy
(
p_data
->
p_buffer
,
p_header
,
4
);
}
/* Give the packet to the other input stages. */
pp_packets
[
i_packet
]
=
p_data
;
...
...
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