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
c54e1de6
Commit
c54e1de6
authored
Jan 10, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packetizer: flac: hint min frame size
parent
68ad868d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
modules/packetizer/flac.c
modules/packetizer/flac.c
+5
-2
No files found.
modules/packetizer/flac.c
View file @
c54e1de6
...
@@ -56,6 +56,7 @@ vlc_module_end()
...
@@ -56,6 +56,7 @@ vlc_module_end()
* decoder_sys_t : FLAC decoder descriptor
* decoder_sys_t : FLAC decoder descriptor
*****************************************************************************/
*****************************************************************************/
#define MAX_FLAC_HEADER_SIZE 16
#define MAX_FLAC_HEADER_SIZE 16
#define MIN_FLAC_FRAME_SIZE ((48+(8 + 4 + 1*4)+16)/8)
struct
decoder_sys_t
struct
decoder_sys_t
{
{
/*
/*
...
@@ -141,6 +142,8 @@ static void ProcessHeader(decoder_t *p_dec)
...
@@ -141,6 +142,8 @@ static void ProcessHeader(decoder_t *p_dec)
__MAX
(
__MIN
(
p_sys
->
stream_info
.
max_blocksize
,
65535
),
16
);
__MAX
(
__MIN
(
p_sys
->
stream_info
.
max_blocksize
,
65535
),
16
);
p_sys
->
stream_info
.
min_framesize
=
bs_read
(
&
bs
,
24
);
p_sys
->
stream_info
.
min_framesize
=
bs_read
(
&
bs
,
24
);
p_sys
->
stream_info
.
min_framesize
=
__MAX
(
p_sys
->
stream_info
.
min_framesize
,
MIN_FLAC_FRAME_SIZE
);
p_sys
->
stream_info
.
max_framesize
=
bs_read
(
&
bs
,
24
);
p_sys
->
stream_info
.
max_framesize
=
bs_read
(
&
bs
,
24
);
p_sys
->
stream_info
.
sample_rate
=
bs_read
(
&
bs
,
20
);
p_sys
->
stream_info
.
sample_rate
=
bs_read
(
&
bs
,
20
);
...
@@ -584,8 +587,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
...
@@ -584,8 +587,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
p_dec
->
fmt_out
.
audio
.
i_rate
=
p_sys
->
i_rate
;
p_dec
->
fmt_out
.
audio
.
i_rate
=
p_sys
->
i_rate
;
}
}
p_sys
->
i_state
=
STATE_NEXT_SYNC
;
p_sys
->
i_state
=
STATE_NEXT_SYNC
;
p_sys
->
i_frame_size
=
p_sys
->
b_stream_info
&&
p_sys
->
stream_info
.
min_framesize
>
0
?
p_sys
->
i_frame_size
=
(
p_sys
->
b_stream_info
)
?
p_sys
->
stream_info
.
min_framesize
:
p_sys
->
stream_info
.
min_framesize
:
1
;
MIN_FLAC_FRAME_SIZE
;
/* We have to read until next frame sync code to compute current frame size
/* We have to read until next frame sync code to compute current frame size
* from that boundary.
* from that boundary.
...
...
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