Avoid removing PID filters when using virtual channel tuning #906
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first step is to improve the error messages. In two
places the "UpdateFilters called in wrong tune mode"
message has been updated to specify the value of the
wrong tune mode.
After these updates, an example of the error message is:
mythbackend: mythbackend[779282]: E HDHRStreamHandler
hdhrstreamhandler.cpp:242 (UpdateFilters) HDHRSH[4]
(13249773): UpdateFilters called in wrong tune mode, 4
The tune mode was hdhrTuneModeVChannel (= 4), and
we know that UpdateFilters was called, but in
hdhrstreamhandler.cpp, the only call to it is avoided for
Vchan tuning.
Code examination reveals that the offending invocation of
UpdateFilters() is in StreamHandler::RemoveAllPIDFilters().
This routine is called unconditionally in
The solution is to condition the call to RemoveAllPIDFilters() in the same way the call to UpdateFilters() was previously conditioned. If we're using Virtual Channel Tuning, then don't bother removing filters which were never created in the first place.
After applying this solution, the UpdateFilters called in wrong tune
mode error messages no longer appear in mythbackend.log.
Resolves #905
Checklist