summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/decklink/gstdecklinkaudiosrc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
index 39d7bd16a..93e16d168 100644
--- a/sys/decklink/gstdecklinkaudiosrc.cpp
+++ b/sys/decklink/gstdecklinkaudiosrc.cpp
@@ -741,8 +741,12 @@ gst_decklink_audio_src_open (GstDecklinkAudioSrc * self)
self->channels_found = self->channels;
} else {
if (self->input->attributes) {
+ int64_t channels_found;
+
HRESULT ret = self->input->attributes->GetInt
- (BMDDeckLinkMaximumAudioChannels, &self->channels_found);
+ (BMDDeckLinkMaximumAudioChannels, &channels_found);
+ self->channels_found = channels_found;
+
/* Sometimes the card may report an invalid number of channels. In
* that case, we should (empirically) use 8. */
if (ret != S_OK ||