-/* BlackMagic SDI driver */
+/* Blackmagic SDI driver */
#ifdef HAVE_CONFIG_H
# include "config.h"
#include <arpa/inet.h>
-#include "DeckLinkAPI.h"
-#include "DeckLinkAPIDispatch.cpp"
+#include <DeckLinkAPI.h>
+#include <DeckLinkAPIDispatch.cpp>
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
vlc_module_begin ()
set_shortname( N_("SDI") )
- set_description( N_("BlackMagic SDI input") )
+ set_description( N_("Blackmagic SDI input") )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
if( !p_audio_frame )
{
msg_Err( p_demux_, "Could not allocate memory for audio frame" );
+ if( p_video_frame )
+ block_Release( p_video_frame );
return S_OK;
}
vlc_mutex_init( &p_sys->frame_lock );
vlc_cond_init( &p_sys->has_frame );
- p_sys->p_video_frame = NULL;
+ p_sys->b_first_frame = true;
IDeckLinkIterator *decklink_iterator = CreateDeckLinkIteratorInstance();
if( !decklink_iterator )
(char*)&audio_fmt.i_codec, audio_fmt.audio.i_rate, audio_fmt.audio.i_bitspersample, audio_fmt.audio.i_channels);
p_sys->p_audio_es = es_out_Add( p_demux->out, &audio_fmt );
- p_sys->b_first_frame = true;
-
/* Update default_pts to a suitable value for access */
var_Create( p_demux, "sdi-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
if( p_sys->p_delegate )
p_sys->p_delegate->Release();
+
+ if( p_sys->p_video_frame )
+ block_Release( p_sys->p_video_frame );
+
+ if( p_sys->p_audio_frame )
+ block_Release( p_sys->p_audio_frame );
free( p_sys );
}