mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 05:05:43 +01:00
Fix possible double allocation of SF_BROADCAST_INFO
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3751 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
b8a4c5b7bf
commit
959907af01
1 changed files with 8 additions and 4 deletions
|
|
@ -157,8 +157,10 @@ SndFileSource::SndFileSource (Session& s, ustring path, SampleFormat sfmt, Heade
|
|||
|
||||
if (writable() && (_flags & Broadcast)) {
|
||||
|
||||
_broadcast_info = new SF_BROADCAST_INFO;
|
||||
memset (_broadcast_info, 0, sizeof (*_broadcast_info));
|
||||
if (!_broadcast_info) {
|
||||
_broadcast_info = new SF_BROADCAST_INFO;
|
||||
memset (_broadcast_info, 0, sizeof (*_broadcast_info));
|
||||
}
|
||||
|
||||
snprintf_bounded_null_filled (_broadcast_info->description, sizeof (_broadcast_info->description), "BWF %s", _name.c_str());
|
||||
snprintf_bounded_null_filled (_broadcast_info->originator, sizeof (_broadcast_info->originator), "ardour %d.%d.%d %s",
|
||||
|
|
@ -250,8 +252,10 @@ SndFileSource::open ()
|
|||
|
||||
_length = _info.frames;
|
||||
|
||||
_broadcast_info = new SF_BROADCAST_INFO;
|
||||
memset (_broadcast_info, 0, sizeof (*_broadcast_info));
|
||||
if (!_broadcast_info) {
|
||||
_broadcast_info = new SF_BROADCAST_INFO;
|
||||
memset (_broadcast_info, 0, sizeof (*_broadcast_info));
|
||||
}
|
||||
|
||||
bool timecode_info_exists;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue