Skip to content
GitLab
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
cdd6c94f
Commit
cdd6c94f
authored
Mar 23, 2019
by
Nicolas Carion
Browse files
Correctly propagate metadata when cloning avfilter clip. Closes
#71
parent
bc4e1ec9
Pipeline
#1799
failed with stage
in 60 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
cdd6c94f
...
...
@@ -765,9 +765,21 @@ std::shared_ptr<Mlt::Producer> ProjectClip::cloneProducer(bool removeEffects)
const
QByteArray
clipXml
=
c
.
get
(
"string"
);
std
::
shared_ptr
<
Mlt
::
Producer
>
prod
;
prod
.
reset
(
new
Mlt
::
Producer
(
pCore
->
getCurrentProfile
()
->
profile
(),
"xml-string"
,
clipXml
.
constData
()));
if
(
strcmp
(
prod
->
get
(
"mlt_service"
),
"avformat"
)
==
0
)
{
prod
->
set
(
"mlt_service"
,
"avformat-novalidate"
);
}
// we pass some properties that wouldn't be passed because of the novalidate
const
char
*
prefix
=
"meta."
;
const
size_t
prefix_len
=
strlen
(
prefix
);
for
(
int
i
=
0
;
i
<
m_masterProducer
->
count
();
++
i
)
{
char
*
current
=
m_masterProducer
->
get_name
(
i
);
if
(
strlen
(
current
)
>=
prefix_len
&&
strncmp
(
current
,
prefix
,
prefix_len
)
==
0
)
{
prod
->
set
(
current
,
m_masterProducer
->
get
(
i
));
}
}
if
(
removeEffects
)
{
int
ct
=
0
;
Mlt
::
Filter
*
filter
=
prod
->
filter
(
ct
);
...
...
src/lib/audio/audioEnvelope.cpp
View file @
cdd6c94f
...
...
@@ -32,11 +32,12 @@ AudioEnvelope::AudioEnvelope(const QString &binId, int clipId, size_t offset, si
connect
(
&
m_watcher
,
&
QFutureWatcherBase
::
finished
,
this
,
[
this
]
{
envelopeReady
(
this
);
});
if
(
!
m_producer
||
!
m_producer
->
is_valid
())
{
qCDebug
(
KDENLIVE_LOG
)
<<
"// Cannot create envelope for producer: "
<<
binId
;
}
m_info
=
std
::
make_unique
<
AudioInfo
>
(
m_producer
);
if
(
length
>
0
)
{
Q_ASSERT
(
length
+
m_offset
<=
m_envelopeSize
);
m_envelopeSize
=
length
;
}
else
{
m_info
=
std
::
make_unique
<
AudioInfo
>
(
m_producer
);
if
(
length
>
0
)
{
Q_ASSERT
(
length
+
m_offset
<=
m_envelopeSize
);
m_envelopeSize
=
length
;
}
}
}
...
...
@@ -89,6 +90,9 @@ AudioEnvelope::AudioSummary AudioEnvelope::loadAndNormalizeEnvelope() const
{
qCDebug
(
KDENLIVE_LOG
)
<<
"Loading envelope ..."
;
AudioSummary
summary
(
m_envelopeSize
);
if
(
!
m_info
||
m_info
->
size
()
==
0
)
{
return
summary
;
}
int
samplingRate
=
m_info
->
info
(
0
)
->
samplingRate
();
mlt_audio_format
format_s16
=
mlt_audio_s16
;
int
channels
=
1
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment