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
Kdenlive
Commits
1f927933
Commit
1f927933
authored
Oct 20, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix playlist clips have no audio regression.
Fixes
#816
parent
a4aef884
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/audio/audioStreamInfo.cpp
View file @
1f927933
...
...
@@ -16,7 +16,7 @@ the Free Software Foundation, either version 3 of the License, or
#include <QString>
#include <cstdlib>
AudioStreamInfo
::
AudioStreamInfo
(
const
std
::
shared_ptr
<
Mlt
::
Producer
>
&
producer
,
int
audioStreamIndex
)
AudioStreamInfo
::
AudioStreamInfo
(
const
std
::
shared_ptr
<
Mlt
::
Producer
>
&
producer
,
int
audioStreamIndex
,
bool
playlist
)
:
m_audioStreamIndex
(
audioStreamIndex
)
,
m_ffmpegAudioIndex
(
0
)
,
m_samplingRate
(
48000
)
...
...
@@ -25,6 +25,10 @@ AudioStreamInfo::AudioStreamInfo(const std::shared_ptr<Mlt::Producer> &producer,
{
// Fetch audio streams
int
streams
=
producer
->
get_int
(
"meta.media.nb_streams"
);
if
(
playlist
)
{
// Playlist clips do not provide stream info
m_audioStreams
.
insert
(
0
,
i18n
(
"Audio"
));
}
int
streamIndex
=
1
;
for
(
int
ix
=
0
;
ix
<
streams
;
ix
++
)
{
char
property
[
200
];
...
...
src/lib/audio/audioStreamInfo.h
View file @
1f927933
...
...
@@ -23,7 +23,7 @@ class AudioStreamInfo
{
public:
// TODO make that access a shared ptr instead of raw
AudioStreamInfo
(
const
std
::
shared_ptr
<
Mlt
::
Producer
>
&
producer
,
int
audioStreamIndex
);
AudioStreamInfo
(
const
std
::
shared_ptr
<
Mlt
::
Producer
>
&
producer
,
int
audioStreamIndex
,
bool
playlist
=
false
);
~
AudioStreamInfo
();
int
samplingRate
()
const
;
...
...
src/mltcontroller/clipcontroller.cpp
View file @
1f927933
...
...
@@ -262,7 +262,7 @@ void ClipController::getInfoForProducer()
m_clipType
=
ClipType
::
Unknown
;
}
if
(
audioIndex
>
-
1
||
m_clipType
==
ClipType
::
Playlist
)
{
m_audioInfo
=
std
::
make_unique
<
AudioStreamInfo
>
(
m_masterProducer
,
audioIndex
);
m_audioInfo
=
std
::
make_unique
<
AudioStreamInfo
>
(
m_masterProducer
,
audioIndex
,
true
);
// Load stream effects
for
(
int
stream
:
m_audioInfo
->
streams
().
keys
())
{
QString
streamEffect
=
m_properties
->
get
(
QString
(
"kdenlive:stream:%1"
).
arg
(
stream
).
toUtf8
().
constData
());
...
...
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