Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
453
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
a57c3a84
Commit
a57c3a84
authored
2 years ago
by
François Cartegnie
Browse files
Options
Downloads
Patches
Plain Diff
packetizer: flac: don't send invalid frame on drain
(cherry picked from commit
599757d9
)
parent
5d8eed50
No related branches found
No related tags found
2 merge requests
!3533
Backport MR 3236 to 3.0.x
,
!2373
[3.0] packetizer: flac: backports
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/packetizer/flac.c
+6
-6
6 additions, 6 deletions
modules/packetizer/flac.c
with
6 additions
and
6 deletions
modules/packetizer/flac.c
+
6
−
6
View file @
a57c3a84
...
...
@@ -381,7 +381,7 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
}
p_sys
->
i_state
=
STATE_NEXT_SYNC
;
p_sys
->
i_offset
=
1
;
p_sys
->
i_offset
=
FLAC_FRAME_SIZE_MIN
;
p_sys
->
i_frame_size
=
0
;
p_sys
->
crc
=
0
;
...
...
@@ -399,9 +399,10 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
FLACStartcodeHelper
,
FLACStartcodeMatcher
)
!=
VLC_SUCCESS
)
{
if
(
pp_block
==
NULL
)
/* EOF/Drain */
size_t
i_remain
=
block_BytestreamRemaining
(
&
p_sys
->
bytestream
);
if
(
pp_block
==
NULL
&&
i_remain
>
FLAC_FRAME_SIZE_MIN
)
/* EOF/Drain */
{
p_sys
->
i_offset
=
block_BytestreamRemaining
(
&
p_sys
->
bytestream
)
;
p_sys
->
i_offset
=
i_remain
;
p_sys
->
i_state
=
STATE_GET_DATA
;
continue
;
}
...
...
@@ -429,9 +430,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
}
case
STATE_GET_DATA
:
if
(
p_sys
->
i_offset
<
FLAC_FRAME_SIZE_MIN
||
(
p_sys
->
b_stream_info
&&
p_sys
->
stream_info
.
min_framesize
>
p_sys
->
i_offset
)
)
if
(
p_sys
->
b_stream_info
&&
p_sys
->
stream_info
.
min_framesize
>
p_sys
->
i_offset
)
{
p_sys
->
i_offset
+=
1
;
p_sys
->
i_state
=
STATE_NEXT_SYNC
;
...
...
This diff is collapsed.
Click to expand it.
zipdox
@zipdox
mentioned in issue
#27477 (closed)
·
2 years ago
mentioned in issue
#27477 (closed)
mentioned in issue #27477
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment