Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
aebe9ea9
Commit
aebe9ea9
authored
Jun 26, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify the validation of sample/frame numbers in flac packetizer.
parent
5977e7b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
+3
-17
modules/packetizer/flac.c
modules/packetizer/flac.c
+3
-17
No files found.
modules/packetizer/flac.c
View file @
aebe9ea9
...
...
@@ -378,10 +378,7 @@ static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf,
int
i_header
,
i_temp
,
i_read
;
unsigned
i_blocksize
=
0
;
int
i_blocksize_hint
=
0
,
i_sample_rate_hint
=
0
;
uint64_t
i_sample_number
=
0
;
bool
b_variable_blocksize
=
(
p_sys
->
b_stream_info
&&
p_sys
->
stream_info
.
min_blocksize
!=
p_sys
->
stream_info
.
max_blocksize
);
bool
b_fixed_blocksize
=
(
p_sys
->
b_stream_info
&&
p_sys
->
stream_info
.
min_blocksize
==
p_sys
->
stream_info
.
max_blocksize
);
...
...
@@ -546,20 +543,9 @@ static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf,
/* End of fixed size header */
i_header
=
4
;
/* Find Sample/Frame number */
if
(
i_blocksize_hint
&&
b_variable_blocksize
)
{
i_sample_number
=
read_utf8
(
&
p_buf
[
i_header
++
],
&
i_read
);
if
(
i_sample_number
==
INT64_C
(
0xffffffffffffffff
)
)
return
0
;
}
else
{
i_sample_number
=
read_utf8
(
&
p_buf
[
i_header
++
],
&
i_read
);
if
(
i_sample_number
==
INT64_C
(
0xffffffffffffffff
)
)
return
0
;
if
(
p_sys
->
b_stream_info
)
i_sample_number
*=
p_sys
->
stream_info
.
min_blocksize
;
}
/* Check Sample/Frame number */
if
(
read_utf8
(
&
p_buf
[
i_header
++
],
&
i_read
)
==
INT64_C
(
0xffffffffffffffff
)
)
return
0
;
i_header
+=
i_read
;
...
...
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