Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
18af5a19
Commit
18af5a19
authored
Dec 28, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in the PSM decoder.
parent
2535b235
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
src/input/input_ps.c
src/input/input_ps.c
+2
-2
src/input/mpeg_system.c
src/input/mpeg_system.c
+14
-8
No files found.
src/input/input_ps.c
View file @
18af5a19
...
...
@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ps.c,v 1.1
5 2000/12/27 18:35:45
massiot Exp $
* $Id: input_ps.c,v 1.1
6 2000/12/28 17:57:39
massiot Exp $
*
* Authors:
*
...
...
@@ -104,7 +104,7 @@ static void PSInit( input_thread_t * p_input )
}
fseek
(
p_method
->
stream
,
0
,
SEEK_SET
);
input_InitStream
(
p_input
,
0
);
input_InitStream
(
p_input
,
sizeof
(
stream_ps_data_t
)
);
input_AddProgram
(
p_input
,
0
,
sizeof
(
stream_ps_data_t
)
);
if
(
p_input
->
stream
.
b_seekable
)
...
...
src/input/mpeg_system.c
View file @
18af5a19
...
...
@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: mpeg_system.c,v 1.2
0 2000/12/27 18:35:45
massiot Exp $
* $Id: mpeg_system.c,v 1.2
1 2000/12/28 17:57:39
massiot Exp $
*
* Authors:
*
...
...
@@ -718,21 +718,21 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
intf_Msg
(
"input info: Your stream contains Program Stream Map information"
);
intf_Msg
(
"input info: Please send a mail to <massiot@via.ecp.fr>"
);
p_demux
->
b_has_PSM
=
1
;
if
(
p_data
->
p_payload_start
+
10
>
p_data
->
p_payload_end
)
{
intf_ErrMsg
(
"PSM too short : packet corrupt"
);
return
;
}
if
(
p_demux
->
i_PSM_version
==
(
p_data
->
p_buffer
[
6
]
&
0x1F
)
)
if
(
p_demux
->
b_has_PSM
&&
p_demux
->
i_PSM_version
==
(
p_data
->
p_buffer
[
6
]
&
0x1F
)
)
{
/* Already got that one. */
return
;
}
intf_DbgMsg
(
"Building PSM"
);
p_demux
->
b_has_PSM
=
1
;
p_demux
->
i_PSM_version
=
p_data
->
p_buffer
[
6
]
&
0x1F
;
/* Go to elementary_stream_map_length, jumping over
...
...
@@ -746,8 +746,8 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
}
/* This is the full size of the elementary_stream_map.
* 2 == elementary_stream_map_length
*
4 == CRC_32
*/
p_end
=
p_byte
+
2
+
U16_AT
(
p_byte
)
-
4
;
*
Please note that CRC_32 is not included in the length.
*/
p_end
=
p_byte
+
2
+
U16_AT
(
p_byte
);
p_byte
+=
2
;
if
(
p_end
>
p_data
->
p_payload_end
)
{
...
...
@@ -782,11 +782,11 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
else
{
/* Move the ES to the beginning. */
i_new_es_number
++
;
p_input
->
stream
.
pp_programs
[
0
]
->
pp_es
[
i
]
=
p_input
->
stream
.
pp_programs
[
0
]
->
pp_es
[
i_new_es_number
];
p_input
->
stream
.
pp_programs
[
0
]
->
pp_es
[
i_new_es_number
]
=
p_es
;
i_new_es_number
++
;
}
break
;
}
...
...
@@ -800,13 +800,13 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
p_es
=
input_AddES
(
p_input
,
p_input
->
stream
.
pp_programs
[
0
],
i_stream_id
,
0
);
p_es
->
i_type
=
p_byte
[
0
];
i_new_es_number
++
;
/* input_AddES has inserted the new element at the end. */
p_input
->
stream
.
pp_programs
[
0
]
->
pp_es
[
p_input
->
stream
.
pp_programs
[
0
]
->
i_es_number
]
=
p_input
->
stream
.
pp_programs
[
0
]
->
pp_es
[
i_new_es_number
];
p_input
->
stream
.
pp_programs
[
0
]
->
pp_es
[
i_new_es_number
]
=
p_es
;
i_new_es_number
++
;
}
p_byte
+=
4
+
U16_AT
(
&
p_byte
[
2
]);
}
...
...
@@ -820,6 +820,12 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
p_input
->
stream
.
pp_programs
[
0
]
->
pp_es
[
i_new_es_number
]
);
/* Yes, I wrote *i_new_es_number* */
}
#ifdef STATS
intf_Msg
(
"input info: The stream map after the PSM is now :"
);
input_DumpStream
(
p_input
);
#endif
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
...
...
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