]> git.sesse.net Git - vlc/blobdiff - modules/access/sdi.cpp
If the audio frame allocation fails, avoid leaking the video frame.
[vlc] / modules / access / sdi.cpp
index 4e8988e075db7204abdcab105c8f61b45e5dce8a..409d8d69445470cd8236982df3a07d2fad6278f2 100644 (file)
@@ -19,8 +19,8 @@
 
 #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 * );
@@ -215,6 +215,8 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
         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;
         }