mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-24 14:17:21 +01:00
AAF: fix NULL pointer dereference
This commit is contained in:
parent
32df0a8ff6
commit
a70a2a2bbb
1 changed files with 7 additions and 2 deletions
|
|
@ -590,18 +590,23 @@ ARDOUR_UI::new_session_from_aaf (string const& aaf, string const& target_dir, st
|
|||
}
|
||||
|
||||
int essenceError = 0;
|
||||
char* essenceName = aafAudioClip->essencePointerList->essenceFile->name;
|
||||
char* essenceName = NULL;
|
||||
|
||||
AAFI_foreachEssencePointer (aafAudioClip->essencePointerList, aafAudioEssencePtr)
|
||||
{
|
||||
struct aafiAudioEssenceFile* audioEssenceFile = aafAudioEssencePtr->essenceFile;
|
||||
|
||||
if (!audioEssenceFile) {
|
||||
PBD::error << string_compose (_ ("AAF: Could not create new region for clip '%1': Missing audio essence"), audioEssenceFile->unique_name) << endmsg;
|
||||
/* should not happen */
|
||||
PBD::error << _ ("AAF: Audio essence pointer is missing an audio essence file entry") << endmsg;
|
||||
essenceError++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!essenceName) {
|
||||
essenceName = aafAudioClip->essencePointerList->essenceFile->name;
|
||||
}
|
||||
|
||||
if (audioEssenceFile->is_embedded) {
|
||||
if (aafi_extractAudioEssenceFile (aafi, audioEssenceFile, AAFI_EXTRACT_DEFAULT, media_cache_path.c_str (), 0, 0, NULL, NULL) < 0) {
|
||||
PBD::error << string_compose ("AAF: Could not extract audio file '%1' from AAF.", audioEssenceFile->unique_name) << endmsg;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue