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
191ad11e
Commit
191ad11e
authored
Nov 28, 2009
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify mpeg_decode_user_data()
Originally committed as revision 20640 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8d872e8a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
mpeg12.c
libavcodec/mpeg12.c
+5
-12
No files found.
libavcodec/mpeg12.c
View file @
191ad11e
...
@@ -2113,28 +2113,21 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
...
@@ -2113,28 +2113,21 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
static
void
mpeg_decode_user_data
(
AVCodecContext
*
avctx
,
static
void
mpeg_decode_user_data
(
AVCodecContext
*
avctx
,
const
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
p
,
int
buf_size
)
{
{
const
uint8_t
*
p
;
const
uint8_t
*
buf_end
=
p
+
buf_size
;
int
len
,
flags
;
p
=
buf
;
len
=
buf_size
;
/* we parse the DTG active format information */
/* we parse the DTG active format information */
if
(
len
>=
5
&&
if
(
buf_end
-
p
>=
5
&&
p
[
0
]
==
'D'
&&
p
[
1
]
==
'T'
&&
p
[
2
]
==
'G'
&&
p
[
3
]
==
'1'
)
{
p
[
0
]
==
'D'
&&
p
[
1
]
==
'T'
&&
p
[
2
]
==
'G'
&&
p
[
3
]
==
'1'
)
{
flags
=
p
[
4
];
int
flags
=
p
[
4
];
p
+=
5
;
p
+=
5
;
len
-=
5
;
if
(
flags
&
0x80
)
{
if
(
flags
&
0x80
)
{
/* skip event id */
/* skip event id */
if
(
len
<
2
)
return
;
p
+=
2
;
p
+=
2
;
len
-=
2
;
}
}
if
(
flags
&
0x40
)
{
if
(
flags
&
0x40
)
{
if
(
len
<
1
)
if
(
buf_end
-
p
<
1
)
return
;
return
;
avctx
->
dtg_active_format
=
p
[
0
]
&
0x0f
;
avctx
->
dtg_active_format
=
p
[
0
]
&
0x0f
;
}
}
...
...
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