Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
1fe68f0e
Commit
1fe68f0e
authored
Jan 14, 2007
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify klv_decode_ber_length
Originally committed as revision 7475 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
28221dd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
mxf.c
libavformat/mxf.c
+4
-8
No files found.
libavformat/mxf.c
View file @
1fe68f0e
...
@@ -182,19 +182,15 @@ static const uint8_t mxf_essence_element_key[] = { 0x06,0x0e,0x2b,0x
...
@@ -182,19 +182,15 @@ static const uint8_t mxf_essence_element_key[] = { 0x06,0x0e,0x2b,0x
static
int64_t
klv_decode_ber_length
(
ByteIOContext
*
pb
)
static
int64_t
klv_decode_ber_length
(
ByteIOContext
*
pb
)
{
{
int64_t
size
=
0
;
uint64_t
size
=
get_byte
(
pb
);
uint8_t
length
=
get_byte
(
pb
);
if
(
size
&
0x80
)
{
/* long form */
int
type
=
length
>>
7
;
int
bytes_num
=
size
&
0x7f
;
if
(
type
)
{
/* long form */
int
bytes_num
=
length
&
0x7f
;
/* SMPTE 379M 5.3.4 guarantee that bytes_num must not exceed 8 bytes */
/* SMPTE 379M 5.3.4 guarantee that bytes_num must not exceed 8 bytes */
if
(
bytes_num
>
8
)
if
(
bytes_num
>
8
)
return
-
1
;
return
-
1
;
size
=
0
;
while
(
bytes_num
--
)
while
(
bytes_num
--
)
size
=
size
<<
8
|
get_byte
(
pb
);
size
=
size
<<
8
|
get_byte
(
pb
);
}
else
{
size
=
length
&
0x7f
;
}
}
return
size
;
return
size
;
}
}
...
...
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