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
b90ba24b
Commit
b90ba24b
authored
Jan 17, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify pts/dts reading
Originally committed as revision 7565 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
6845801f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
mpeg.c
libavformat/mpeg.c
+11
-11
No files found.
libavformat/mpeg.c
View file @
b90ba24b
...
...
@@ -1502,13 +1502,13 @@ static int mpegps_read_pes_header(AVFormatContext *s,
c
=
get_byte
(
&
s
->
pb
);
len
-=
2
;
}
if
((
c
&
0x
f
0
)
==
0x20
)
{
if
((
c
&
0x
e
0
)
==
0x20
)
{
dts
=
pts
=
get_pts
(
&
s
->
pb
,
c
);
len
-=
4
;
}
else
if
((
c
&
0xf0
)
==
0x30
)
{
pts
=
get_pts
(
&
s
->
pb
,
c
);
dts
=
get_pts
(
&
s
->
pb
,
-
1
)
;
len
-=
9
;
if
(
c
&
0x10
)
{
dts
=
get_pts
(
&
s
->
pb
,
-
1
);
len
-=
5
;
}
}
else
if
((
c
&
0xc0
)
==
0x80
)
{
/* mpeg 2 PES */
#if 0 /* some streams have this field set for no apparent reason */
...
...
@@ -1522,15 +1522,15 @@ static int mpegps_read_pes_header(AVFormatContext *s,
len
-=
2
;
if
(
header_len
>
len
)
goto
error_redo
;
if
(
(
flags
&
0xc0
)
==
0x80
)
{
if
(
flags
&
0x80
)
{
dts
=
pts
=
get_pts
(
&
s
->
pb
,
-
1
);
header_len
-=
5
;
len
-=
5
;
}
if
((
flags
&
0xc0
)
==
0xc
0
)
{
p
ts
=
get_pts
(
&
s
->
pb
,
-
1
);
dts
=
get_pts
(
&
s
->
pb
,
-
1
)
;
header_len
-=
10
;
len
-=
10
;
if
(
flags
&
0x4
0
)
{
d
ts
=
get_pts
(
&
s
->
pb
,
-
1
);
header_len
-=
5
;
len
-=
5
;
}
}
len
-=
header_len
;
while
(
header_len
>
0
)
{
...
...
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