Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ce7cf600
Commit
ce7cf600
authored
Jul 31, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegdemux: move private stream 1 handling out of mpegps_read_pes_header
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
afa6afcc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
mpeg.c
libavformat/mpeg.c
+16
-12
No files found.
libavformat/mpeg.c
View file @
ce7cf600
...
...
@@ -349,18 +349,6 @@ static int mpegps_read_pes_header(AVFormatContext *s,
if
(
startcode
==
PRIVATE_STREAM_1
)
{
startcode
=
avio_r8
(
s
->
pb
);
len
--
;
if
(
startcode
>=
0x80
&&
startcode
<=
0xcf
)
{
/* audio: skip header */
avio_r8
(
s
->
pb
);
avio_r8
(
s
->
pb
);
avio_r8
(
s
->
pb
);
len
-=
3
;
if
(
startcode
>=
0xb0
&&
startcode
<=
0xbf
)
{
/* MLP/TrueHD audio has a 4-byte header */
avio_r8
(
s
->
pb
);
len
--
;
}
}
}
if
(
len
<
0
)
goto
error_redo
;
...
...
@@ -397,6 +385,22 @@ static int mpegps_read_packet(AVFormatContext *s,
if
(
len
<
0
)
return
len
;
if
(
startcode
>=
0x80
&&
startcode
<=
0xcf
)
{
if
(
len
<
4
)
goto
skip
;
/* audio: skip header */
avio_r8
(
s
->
pb
);
avio_r8
(
s
->
pb
);
avio_r8
(
s
->
pb
);
len
-=
3
;
if
(
startcode
>=
0xb0
&&
startcode
<=
0xbf
)
{
/* MLP/TrueHD audio has a 4-byte header */
avio_r8
(
s
->
pb
);
len
--
;
}
}
/* now find stream */
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
st
=
s
->
streams
[
i
];
...
...
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