Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
ddf451e7
Commit
ddf451e7
authored
Aug 13, 2012
by
Mathis Rosenhauer
Browse files
Output pending zero blocks if AE_FLUSH
parent
b2de8f5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aee.c
View file @
ddf451e7
...
...
@@ -331,6 +331,12 @@ int ae_encode(ae_streamp strm, int flush)
}
else
{
if
(
state
->
zero_blocks
)
{
/* Output any remaining zero blocks */
state
->
mode
=
M_ENCODE_ZERO
;
break
;
}
/* Pad last output byte with 1 bits
if user wants to flush, i.e. we got
all input there is.
...
...
@@ -548,11 +554,6 @@ int ae_encode(ae_streamp strm, int flush)
state
->
mode
=
M_FLUSH_BLOCK
;
case
M_FLUSH_BLOCK
:
if
(
strm
->
avail_in
==
0
&&
flush
==
AE_FLUSH
)
{
/* pad last byte with 1 bits */
emit
(
state
,
0xff
,
state
->
bitp
);
}
state
->
i
=
0
;
state
->
mode
=
M_FLUSH_BLOCK_LOOP
;
...
...
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