From 74a3c1dfe699a0b273873ec160d124375205ff29 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 10 Nov 2017 12:25:58 +0100 Subject: [PATCH 1/4] fix memleak, init and compil Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/f89bffb34f43d53ea1eb1fe57df42a5ff211c98b Author: Jacek Jendrzej Date: 2017-11-10 (Fri, 10 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- common/ca_ci.cpp | 2 +- libarmbox/playback_gst.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/ca_ci.cpp b/common/ca_ci.cpp index c4a2b06..4698637 100644 --- a/common/ca_ci.cpp +++ b/common/ca_ci.cpp @@ -1037,7 +1037,7 @@ void cCA::setInputs() if (fd) { printf("set input%d to tuner %s\n", number, getTunerLetter(number).c_str()); - fprintf(fd, getTunerLetter(number).c_str()); + fprintf(fd,"%s", getTunerLetter(number).c_str()); } else { diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index c04c49c..10f1e6b 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -325,7 +325,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) case GST_STATE_CHANGE_READY_TO_PAUSED: { GstIterator *children; - GValue r = { 0, }; + GValue r = G_VALUE_INIT; if (audioSink) { @@ -390,6 +390,8 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) default: break; } + if(sourceName) + g_free(sourceName); return GST_BUS_DROP; } From 7912c6031412fabf66ce9784c71ab391435e8ae6 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 10 Nov 2017 12:37:46 +0100 Subject: [PATCH 2/4] add check if children not NULL Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/0034be6b17d4a5a9523b9ffb2389ab7ec29e75da Author: Jacek Jendrzej Date: 2017-11-10 (Fri, 10 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/playback_gst.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index 10f1e6b..2854589 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -339,8 +339,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) videoSink = NULL; } children = gst_bin_iterate_recurse(GST_BIN(m_gst_playbin)); - - if (gst_iterator_find_custom(children, (GCompareFunc)match_sinktype, &r, (gpointer)"GstDVBAudioSink")) + if (children && gst_iterator_find_custom(children, (GCompareFunc)match_sinktype, &r, (gpointer)"GstDVBAudioSink")) { audioSink = GST_ELEMENT_CAST(g_value_dup_object (&r)); g_value_unset (&r); @@ -349,8 +348,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) gst_iterator_free(children); children = gst_bin_iterate_recurse(GST_BIN(m_gst_playbin)); - - if (gst_iterator_find_custom(children, (GCompareFunc)match_sinktype, &r, (gpointer)"GstDVBVideoSink")) + if (children && gst_iterator_find_custom(children, (GCompareFunc)match_sinktype, &r, (gpointer)"GstDVBVideoSink")) { videoSink = GST_ELEMENT_CAST(g_value_dup_object (&r)); g_value_unset (&r); From a4b9b6a01f60d82381506f59fdaf0bf143df2bc8 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 10 Nov 2017 12:50:15 +0100 Subject: [PATCH 3/4] check m_stream_tags if not NULL Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/10b2aaa454281a5ab2170dd839ea6196a4b0bbf3 Author: Jacek Jendrzej Date: 2017-11-10 (Fri, 10 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/playback_gst.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index 2854589..a553ea2 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -1017,7 +1017,9 @@ void cPlayback::GetMetadata(std::vector &keys, std::vector Date: Sat, 11 Nov 2017 14:41:54 +0100 Subject: [PATCH 4/4] fix missing close fd (thx dbo) Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/7efcadabd724cfee3a84a02be71d9c225ccd9c62 Author: TangoCash Date: 2017-11-11 (Sat, 11 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- common/ca_ci.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/ca_ci.cpp b/common/ca_ci.cpp index 4698637..d50ced0 100644 --- a/common/ca_ci.cpp +++ b/common/ca_ci.cpp @@ -1038,6 +1038,7 @@ void cCA::setInputs() { printf("set input%d to tuner %s\n", number, getTunerLetter(number).c_str()); fprintf(fd,"%s", getTunerLetter(number).c_str()); + fclose(fd); } else {