FIX: Removed NDI free fctns when receiving NDI frame type none

This commit is contained in:
o-reo 2019-03-06 17:57:28 +01:00
parent 547df0f042
commit 16139c4565
2 changed files with 0 additions and 4 deletions

View file

@ -420,7 +420,6 @@ impl ObjectSubclass for NdiAudioSrc {
if (frame_type == NDIlib_frame_type_e::NDIlib_frame_type_none && _settings.loss_threshold != 0)
|| frame_type == NDIlib_frame_type_e::NDIlib_frame_type_error
{
NDIlib_recv_free_audio_v2(pNDI_recv, &audio_frame);
if count_frame_none < _settings.loss_threshold{
count_frame_none += 1;
continue;
@ -429,7 +428,6 @@ impl ObjectSubclass for NdiAudioSrc {
return Err(gst::FlowError::CustomError);
}
else if frame_type == NDIlib_frame_type_e::NDIlib_frame_type_none && _settings.loss_threshold == 0{
NDIlib_recv_free_audio_v2(pNDI_recv, &audio_frame);
gst_debug!(self.cat, obj: element, "No audio frame received, sending empty buffer");
let buffer = gst::Buffer::with_size(0).unwrap();
return Ok(buffer)

View file

@ -428,7 +428,6 @@ impl ObjectSubclass for NdiVideoSrc {
if (frame_type == NDIlib_frame_type_e::NDIlib_frame_type_none && _settings.loss_threshold != 0)
|| frame_type == NDIlib_frame_type_e::NDIlib_frame_type_error
{
NDIlib_recv_free_video_v2(pNDI_recv, &video_frame);
if count_frame_none < _settings.loss_threshold{
count_frame_none += 1;
continue;
@ -437,7 +436,6 @@ impl ObjectSubclass for NdiVideoSrc {
return Err(gst::FlowError::CustomError);
}
else if frame_type == NDIlib_frame_type_e::NDIlib_frame_type_none && _settings.loss_threshold == 0{
NDIlib_recv_free_video_v2(pNDI_recv, &video_frame);
gst_debug!(self.cat, obj: element, "No video frame received, sending empty buffer");
let buffer = gst::Buffer::with_size(0).unwrap();
return Ok(buffer)