Project

General

Profile

Actions

Bug #4249

open

Stream filter EMPTY rule wrong behavior

Added by Turnip Pinrut about 8 years ago. Updated about 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Service Mapping
Target version:
-
Start date:
2017-02-22
Due date:
% Done:

0%

Estimated time:
Found in version:
Git master 21 Feb 2017
Affected Versions:

Description

Say I want to remove a specific language from the audio streams in all channels, unless that is the only audio stream available in that channel.

I make two rules in the Audio stream filters:

1. language-I-don't-want IGNORE
2. language-I-don't-want EMPTY

Both the Stream type and Service fields are left blank, so that the rules would apply to all channels.

What is expected:
1. The first rule would remove the language-I-don't-want from any channel that has it, while the other language audio streams would remain, if any. This rule works as expected.
2. The second rule would add the language-I-don't-want back to the stream, ONLY if there are no other audio streams left after removing it with the first rule.

What is happening:

The EMPTY rule adds the language-I-don't-want back into the stream regardless whether there are other languages left in the stream after the first rule, essentially cancelling out the first rule.

Log shows the language-I-don't-want being removed and re-added regardless of the presence of other languages:
2017-02-21 23:30:42.770 [ INFO] service: esfilter: "AMEDIA HIT HD" AUDIO 002 001 02132 MPEG2AUDIO rus IGNORE
2017-02-21 23:30:42.770 [ INFO] service: esfilter: "AMEDIA HIT HD" AUDIO 003 001 02133 AC3 rus IGNORE
2017-02-21 23:30:42.770 [ INFO] service: esfilter: "AMEDIA HIT HD" AUDIO 002 002 02132 MPEG2AUDIO rus EMPTY
2017-02-21 23:30:42.770 [ INFO] service: esfilter: "AMEDIA HIT HD" AUDIO 003 002 02133 AC3 rus EMPTY
This channel has two audio streams, rus and eng, both mpeg2 audio.

I believe the problem lies in line 629 of /src/service.c, although I could be wrong; I don't quite understand the code logic there.
Link: [[https://github.com/tvheadend/tvheadend/blob/master/src/service.c#L629]]

Workaround:
Create an EMPTY rule that adds the language-I-don't-want back into the channel for each channel in which the language-I-don't-want is the only audio stream, manually specifying the channels.

My Tvheadend setup is IPTV with a single IPTV Automatic Network, using OSMC Kodi v17 as a front end. HTSP is used as the protocol, no transcoding.
Tvheadend configured with: --disable-libx264 --disable-libx264_static --disable-libx265 --disable-libx265_static --disable-libvpx --disable-libvpx_static --disable-libtheora --disable-libtheora_static --disable-libvorbis --disable-libvorbis_static --disable-libfdkaac --disable-libfdkaac_static --disable-nvenc --disable-libmfx_static

Actions

Also available in: Atom PDF