mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
decklink: Initialize refcount of our C++ classes in the constructor
CID 1262288 CID 1262287 CID 1262289
This commit is contained in:
parent
0b3f5dafa6
commit
b79ece392c
3 changed files with 6 additions and 1 deletions
|
@ -405,7 +405,8 @@ private:
|
|||
gint m_refcount;
|
||||
public:
|
||||
GStreamerDecklinkInputCallback (GstDecklinkInput * input)
|
||||
: IDeckLinkInputCallback ()
|
||||
: IDeckLinkInputCallback (),
|
||||
m_refcount (1)
|
||||
{
|
||||
m_input = input;
|
||||
g_mutex_init (&m_mutex);
|
||||
|
|
|
@ -140,6 +140,8 @@ class GStreamerAudioOutputCallback:public IDeckLinkAudioOutputCallback
|
|||
{
|
||||
public:
|
||||
GStreamerAudioOutputCallback (GstDecklinkAudioSinkRingBuffer * ringbuffer)
|
||||
: IDeckLinkAudioOutputCallback (),
|
||||
m_refcount (1)
|
||||
{
|
||||
m_ringbuffer =
|
||||
GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (gst_object_ref (ringbuffer));
|
||||
|
|
|
@ -343,6 +343,8 @@ class GStreamerVideoOutputCallback:public IDeckLinkVideoOutputCallback
|
|||
{
|
||||
public:
|
||||
GStreamerVideoOutputCallback (GstDecklinkVideoSink * sink)
|
||||
: IDeckLinkVideoOutputCallback (),
|
||||
m_refcount (1)
|
||||
{
|
||||
m_sink = GST_DECKLINK_VIDEO_SINK_CAST (gst_object_ref (sink));
|
||||
g_mutex_init (&m_mutex);
|
||||
|
|
Loading…
Reference in a new issue