mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 06:40:03 +00:00
DeckLink cap.: return audio even if there is no video
This allows to keep the audio stream intact even if video pipeline is struggling without dropping audio frames.
This commit is contained in:
@@ -1623,7 +1623,7 @@ vidcap_decklink_grab(void *state, struct audio_frame **audio)
|
||||
}
|
||||
*/
|
||||
|
||||
return NULL;
|
||||
frame_ready = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1635,6 +1635,8 @@ vidcap_decklink_grab(void *state, struct audio_frame **audio)
|
||||
s->state[i].delegate->newFrameReady = 0;
|
||||
}
|
||||
|
||||
*audio = process_new_audio_packets(s); // return audio even if there is no video to avoid
|
||||
// hoarding and then dropping of audio packets
|
||||
// UNLOCK - UNLOCK - UNLOCK - UNLOCK - UNLOCK - UNLOCK - UNLOCK - UNLOCK - UN //
|
||||
lk.unlock();
|
||||
|
||||
@@ -1677,10 +1679,6 @@ vidcap_decklink_grab(void *state, struct audio_frame **audio)
|
||||
if (count == s->devices_cnt) {
|
||||
s->frames++;
|
||||
|
||||
lk.lock();
|
||||
*audio = process_new_audio_packets(s);
|
||||
lk.unlock();
|
||||
|
||||
struct timeval t;
|
||||
gettimeofday(&t, NULL);
|
||||
double seconds = tv_diff(t, s->t0);
|
||||
|
||||
Reference in New Issue
Block a user