From c192f6a655da8b4d3bfed8ba07577a5a38f363af Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 18 Oct 2017 12:50:34 +0200 Subject: [PATCH 1/2] ca_ci: in some situations missing scambled flag (thx dbo) Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/0dd25ef8fb040533d038372046ee1ce7020b9043 Author: TangoCash Date: 2017-10-18 (Wed, 18 Oct 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- common/ca_ci.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/ca_ci.cpp b/common/ca_ci.cpp index 72772f6..9f8cd3c 100644 --- a/common/ca_ci.cpp +++ b/common/ca_ci.cpp @@ -692,14 +692,20 @@ SlotIt cCA::FindFreeSlot(u64 TP, u8 source, u16 SID, ca_map_t camap, unsigned ch for (int j = 0; j < CI_MAX_MULTI; j++) { if ((*it)->TP == TP && (*it)->SID[j] == SID && (*it)->source == source) + { + (*it)->scrambled = scrambled; return it; + } } } for (it = slot_data.begin(); it != slot_data.end(); ++it) { if ((*it)->multi && (*it)->TP == TP && (*it)->source == source && (*it)->ci_use_count < CI_MAX_MULTI) - return it; + { + (*it)->scrambled = scrambled; + return it; + } } for (it = slot_data.begin(); it != slot_data.end(); ++it) From 23b5ef5a72423668dfb5480a4c4946d7191af747 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 18 Oct 2017 21:05:28 +0200 Subject: [PATCH 2/2] armbox: tryfix lost of video device after playing something with gst Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/99eb4a3c7f1c94c589e62cb3b1764f72e0e2f601 Author: TangoCash Date: 2017-10-18 (Wed, 18 Oct 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 6979df9..c55df3a 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -189,6 +189,8 @@ retry: } lt_info("#%d: %s cannot open %s: %m, retries %d\n", devnum, __func__, VDEV[devnum], n); } + ioctl(fd, VIDEO_STOP, 0); + ioctl(fd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_DEMUX); playstate = VIDEO_STOPPED; } @@ -197,6 +199,10 @@ void cVideo::closeDevice(void) lt_debug("%s\n", __func__); /* looks like sometimes close is unhappy about non-empty buffers */ Start(); + ioctl(fd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY); + ioctl(fd, VIDEO_PLAY); + ioctl(fd, VIDEO_CONTINUE); + ioctl(fd, VIDEO_CLEAR_BUFFER); if (fd >= 0) close(fd); fd = -1;