Skip to content

Commit

Permalink
Merge pull request #654 from ksooo/fix-predictive-tuning
Browse files Browse the repository at this point in the history
Predictive tuning: Fix crash when starting playback
  • Loading branch information
ksooo authored Mar 3, 2024
2 parents 29bc885 + 55d58da commit 0effdb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pvr.hts/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.hts"
version="21.2.0"
version="21.2.1"
name="Tvheadend HTSP Client"
provider-name="Adam Sutton, Sam Stenvall, Lars Op den Kamp, Kai Sommerfeld">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
4 changes: 4 additions & 0 deletions pvr.hts/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v21.2.1
- Predictive tuning: Fix crash when starting playback of a channel which has no unique channel number
(tvh does not prevent duplicate channel numbers).

v21.2.0
- Add setting for threshold for reconnect on stalled streams

Expand Down
6 changes: 5 additions & 1 deletion src/tvheadend/ChannelTuningPredictor.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ struct SortChannelPair
{
bool operator()(const ChannelPair& left, const ChannelPair& right) const
{
return left.second < right.second;
if (left.second < right.second)
return true;

// if channel numbers are equal, consider channel id (which is unique)
return left.first < right.first;
}
};
} // namespace predictivetune
Expand Down

0 comments on commit 0effdb6

Please sign in to comment.