Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kwave
Commits
ad7e0654
Commit
ad7e0654
authored
Oct 24, 2021
by
Thomas Eschenbacher
Browse files
bugfix: wrong calculation on opus encoder, causing corrupted files
parent
5570502c
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
ad7e0654
...
...
@@ -5,6 +5,7 @@
misinterpreting file names in cmdline parameters as http:// URLs
* fixed deprecation warnings: QRecursiveMutex, KPluginFactory
* bugfix: wrong tooltip translation for selection range (and other times)
* bugfix: wrong calculation on opus encoder, causing corrupted files
20.08.01 [2020-08-31]
...
...
kwave/TopWidget.cpp
View file @
ad7e0654
...
...
@@ -1417,7 +1417,7 @@ void Kwave::TopWidget::updateMenu()
foreach
(
const
Kwave
::
Label
&
label
,
labels
)
{
QString
name
=
label
.
name
();
QString
desc
=
(
name
.
length
())
?
i18nc
(
i18nc
(
"list menu entry of a label, %1=index, %2=description/name"
,
"#%1 (%2)"
,
index
,
name
)
:
i18nc
(
"list menue entry of a label, "
...
...
plugins/codec_ogg/OpusEncoder.cpp
View file @
ad7e0654
...
...
@@ -786,7 +786,6 @@ unsigned int Kwave::OpusEncoder::fillInBuffer(Kwave::MultiTrackReader &src)
unsigned
int
count
=
0
;
unsigned
int
rest
=
m_frame_size
;
while
(
rest
)
{
float
*
p
=
m_encoder_input
+
t
;
// while buffer is empty and source is not at eof:
// trigger the start of the chain to produce some data
...
...
@@ -805,6 +804,7 @@ unsigned int Kwave::OpusEncoder::fillInBuffer(Kwave::MultiTrackReader &src)
// fill the frame data
rest
-=
len
;
count
+=
len
;
float
*
p
=
m_encoder_input
+
t
;
while
(
len
--
)
{
*
p
=
sample2float
(
*
(
s
++
));
p
+=
m_encoder_channels
;
...
...
@@ -818,12 +818,13 @@ unsigned int Kwave::OpusEncoder::fillInBuffer(Kwave::MultiTrackReader &src)
// if we were not able to fill a complete frame, we probably are at eof
// and have some space to pad with extra samples to compensate preskip
while
((
n
<
m_frame_size
)
&&
m_extra_out
)
{
unsigned
int
extra_out
=
m_extra_out
;
while
((
n
<
m_frame_size
)
&&
extra_out
)
{
Q_ASSERT
(
src
.
eof
());
for
(
unsigned
int
t
=
0
;
t
<
m_encoder_channels
;
++
t
)
{
m_encoder_input
[(
n
+
t
)
*
m_encoder_channels
]
=
0.0
;
m_encoder_input
[(
n
*
m_encoder_channels
)
+
t
]
=
0.0
;
}
m_
extra_out
--
;
extra_out
--
;
n
++
;
}
...
...
Write
Preview
Supports
Markdown
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