Browse Source

fix hls segmenter in some cultures (#582)

pull/583/head
Jason Dove 4 years ago committed by GitHub
parent
commit
3ce267863b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 7
      ErsatzTV.Core/FFmpeg/HlsPlaylistFilter.cs

1
CHANGELOG.md

@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix issue preventing some versions of ffmpeg (usually 4.4.x) from streaming MPEG-TS (Legacy) channels at all
- The issue appears to be caused by using a thread count other than `1`
- Thread count is now forced to `1` for all streaming modes other than HLS Segmenter
- Fix bug with HLS Segmenter in cultures where `.` is a group/thousands separator
### Changed
- Upgrade ffmpeg from 4.4 to 5.0 in all docker images

7
ErsatzTV.Core/FFmpeg/HlsPlaylistFilter.cs

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
using System;
using System.Globalization;
using System.Text;
namespace ErsatzTV.Core.FFmpeg
@ -55,7 +56,11 @@ namespace ErsatzTV.Core.FFmpeg @@ -55,7 +56,11 @@ namespace ErsatzTV.Core.FFmpeg
continue;
}
var duration = TimeSpan.FromSeconds(double.Parse(lines[i].TrimEnd(',').Split(':')[1]));
var duration = TimeSpan.FromSeconds(
double.Parse(
lines[i].TrimEnd(',').Split(':')[1],
NumberStyles.Number,
CultureInfo.InvariantCulture));
if (currentTime < filterBefore)
{
currentTime += duration;

Loading…
Cancel
Save