From bcc3a25ed5ebb40043f1008eaaab1b27c5f83b83 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Sun, 12 Nov 2017 21:21:15 +0100 Subject: [PATCH 1/2] fix 0648 caid issue (dbo!!!) Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/d6d3456368d7e68c01528e3fb99f3fa693120422 Author: TangoCash Date: 2017-11-12 (Sun, 12 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libdvbci/dvbci_camgr.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libdvbci/dvbci_camgr.cpp b/libdvbci/dvbci_camgr.cpp index 24917f3..6f1264c 100644 --- a/libdvbci/dvbci_camgr.cpp +++ b/libdvbci/dvbci_camgr.cpp @@ -47,6 +47,13 @@ int eDVBCICAManagerSession::receivedAPDU(const unsigned char *tag, const void *d printf("%04x ", 0x186D); break; } + + if (caids[i] == 0x0648) + { + caids.push_back(0x0650); + printf("%04x ", 0x0650); + break; + } } } std::sort(caids.begin(), caids.end()); From f3d8b44e60e55386db576140e352802e508f3c5d Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 13 Nov 2017 09:44:47 +0100 Subject: [PATCH 2/2] try to fix possible race condition Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/3c12a78dddf0d425ee141372a81666fc40232ec3 Author: Jacek Jendrzej Date: 2017-11-13 (Mon, 13 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/playback_gst.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index b7a6548..e4b19d9 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -72,6 +72,8 @@ GstElement * audioSink = NULL; GstElement * videoSink = NULL; gchar * uri = NULL; GstTagList * m_stream_tags = NULL; +pthread_mutex_t mutex_tag_ist; + static int end_eof = 0; #define HTTP_TIMEOUT 30 // taken from record.h @@ -261,6 +263,8 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) if(!GST_IS_TAG_LIST(tags)) break; + pthread_mutex_lock (&mutex_tag_ist); + result = gst_tag_list_merge(m_stream_tags, tags, GST_TAG_MERGE_REPLACE); if (result) { @@ -268,6 +272,8 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) { gst_tag_list_unref(tags); gst_tag_list_unref(result); + + pthread_mutex_unlock (&mutex_tag_ist); break; } if (m_stream_tags) @@ -276,6 +282,8 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) gst_tag_list_unref(result); } + pthread_mutex_unlock (&mutex_tag_ist); + const GValue *gv_image = gst_tag_list_get_value_index(tags, GST_TAG_IMAGE, 0); if ( gv_image ) { @@ -413,6 +421,8 @@ cPlayback::cPlayback(int num) gst_mpegts_initialize(); + pthread_mutex_init (&mutex_tag_ist, NULL); + if (nano == 1) nano_str = "(CVS)"; else if (nano == 2) @@ -437,8 +447,10 @@ cPlayback::~cPlayback() { lt_info( "%s:%s\n", FILENAME, __FUNCTION__); //FIXME: all deleting stuff is done in Close() + pthread_mutex_lock (&mutex_tag_ist); if (m_stream_tags) gst_tag_list_unref(m_stream_tags); + pthread_mutex_unlock (&mutex_tag_ist); } //Used by Fileplay @@ -530,9 +542,11 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/, mAudioStream = 0; init_jump = -1; + pthread_mutex_lock (&mutex_tag_ist); if (m_stream_tags) gst_tag_list_unref(m_stream_tags); m_stream_tags = NULL; + pthread_mutex_unlock (&mutex_tag_ist); unlink("/tmp/.id3coverart"); @@ -1030,14 +1044,21 @@ void cPlayback::GetMetadata(std::vector &keys, std::vector