Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
03e0644c
Commit
03e0644c
authored
Oct 14, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flac packetizer: use the largest possible frame size
Fixes #6476 Fixes #9442
parent
7e2edc0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
modules/packetizer/flac.c
modules/packetizer/flac.c
+21
-4
No files found.
modules/packetizer/flac.c
View file @
03e0644c
...
...
@@ -248,6 +248,7 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
while
(
1
)
{
int
previous_size
;
switch
(
p_sys
->
i_state
)
{
case
STATE_NOSYNC
:
...
...
@@ -315,6 +316,8 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
/* TODO: If pp_block == NULL, flush the buffer without checking the
* next sync word */
previous_size
=
0
;
/* Try to return the biggest frame */
/* Check if next expected frame contains the sync word */
while
(
block_PeekOffsetBytes
(
&
p_sys
->
bytestream
,
p_sys
->
i_frame_size
,
p_header
,
...
...
@@ -330,13 +333,27 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
&
p_sys
->
i_rate
,
&
p_sys
->
i_bits_per_sample
);
if
(
i_frame_length
)
{
if
(
i_frame_length
)
{
if
(
!
p_sys
->
b_stream_info
||
p_sys
->
stream_info
.
max_framesize
<=
0
)
{
/* Stop immediately if we don't know the maximum framesize */
p_sys
->
i_state
=
STATE_SEND_DATA
;
break
;
}
previous_size
=
p_sys
->
i_frame_size
;
}
}
p_sys
->
i_frame_size
++
;
if
(
p_sys
->
b_stream_info
&&
p_sys
->
stream_info
.
max_framesize
>
0
&&
p_sys
->
i_frame_size
>
p_sys
->
stream_info
.
max_framesize
)
break
;
}
if
(
previous_size
)
{
/* Use the largest frame size */
p_sys
->
i_frame_size
=
previous_size
;
p_sys
->
i_state
=
STATE_SEND_DATA
;
}
if
(
p_sys
->
i_state
!=
STATE_SEND_DATA
)
...
...
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