Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
7e3972c4
Commit
7e3972c4
authored
Aug 07, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a small heuristic to improve MLP detection in AOB.
parent
deeb9757
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
modules/demux/ps.c
modules/demux/ps.c
+16
-0
modules/demux/ps.h
modules/demux/ps.h
+4
-2
No files found.
modules/demux/ps.c
View file @
7e3972c4
...
...
@@ -87,6 +87,8 @@ struct demux_sys_t
int
i_time_track
;
int64_t
i_current_pts
;
int
i_aob_mlp_count
;
bool
b_lost_sync
;
bool
b_have_pack
;
bool
b_seekable
;
...
...
@@ -135,6 +137,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_force )
p_sys
->
i_length
=
-
1
;
p_sys
->
i_current_pts
=
(
mtime_t
)
0
;
p_sys
->
i_time_track
=
-
1
;
p_sys
->
i_aob_mlp_count
=
0
;
p_sys
->
b_lost_sync
=
false
;
p_sys
->
b_have_pack
=
false
;
...
...
@@ -355,6 +358,19 @@ static int Demux( demux_t *p_demux )
default:
if
(
(
i_id
=
ps_pkt_id
(
p_pkt
))
>=
0xc0
)
{
/* Small heuristic to improve MLP detection from AOB */
if
(
i_id
==
0xa001
&&
p_sys
->
i_aob_mlp_count
<
500
)
{
p_sys
->
i_aob_mlp_count
++
;
}
else
if
(
i_id
==
0xbda1
&&
p_sys
->
i_aob_mlp_count
>
0
)
{
p_sys
->
i_aob_mlp_count
--
;
i_id
=
0xa001
;
}
bool
b_new
=
false
;
ps_track_t
*
tk
=
&
p_sys
->
tk
[
PS_ID_TO_TK
(
i_id
)];
...
...
modules/demux/ps.h
View file @
7e3972c4
...
...
@@ -229,7 +229,8 @@ static inline int ps_pkt_id( block_t *p_pkt )
if
(
(
i_sub_id
&
0xfe
)
==
0xa0
&&
p_pkt
->
i_buffer
>=
i_start
+
7
&&
p_pkt
->
p_buffer
[
i_start
+
6
]
!=
0x80
)
(
p_pkt
->
p_buffer
[
i_start
+
5
]
>=
0xc0
||
p_pkt
->
p_buffer
[
i_start
+
6
]
!=
0x80
)
)
{
/* AOB LPCM/MLP extension
* XXX for MLP I think that the !=0x80 test is not good and
...
...
@@ -485,7 +486,8 @@ static inline int ps_pkt_parse_pes( block_t *p_pes, int i_skip_extra )
if
(
i_skip_extra
>=
0
)
i_skip
+=
i_skip_extra
;
else
if
(
p_pes
->
i_buffer
>
i_skip
+
3
&&
ps_pkt_id
(
p_pes
)
==
0xa001
)
else
if
(
p_pes
->
i_buffer
>
i_skip
+
3
&&
(
ps_pkt_id
(
p_pes
)
==
0xa001
||
ps_pkt_id
(
p_pes
)
==
0xbda1
)
)
i_skip
+=
4
+
p_pes
->
p_buffer
[
i_skip
+
3
];
if
(
p_pes
->
i_buffer
<=
i_skip
)
...
...
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