support: Tarball generation script.
(cherry picked from commit ddad1d21dcd64e5d51dc24c46a4f7ec24f0673b1)
htsp: Plug possible memory leak at HTSP disconnect

If subscriber is slow we will leak memory because buffered packets
will not be free'd upon HTSP session close
(cherry picked from commit 683b0f9c8bf4feaa0f3a17b1114b519005072e30)
htsp: fix 'use after free' of the htsp logname when the connection to the client is lost.
(cherry picked from commit fd6f813d83a8a916d7f8012acf15b49e408a916f)
Fix #1369 - move iptv service type store inside main tab function else it causes a 401 error for non-admin UI users.

(cherry picked from commit 254872a8f8ec5c43c0dce86f1e521f9c22e361df)
(cherry picked from commit 777e4108b96e6fa15ce3ed2bd0592a3e427bcea2)
Fix #1393 - minor aesthetic change, remove trailing slash from user config DVR directory.

(cherry picked from commit c05f93da5321a8b14f209814e78a6a1581232540)
Fix #1397 - only load adapter config if tab is enabled.
(cherry picked from commit e74f53574cf1449c8e94d22da0bb2fca50473b65)
Fix #1266 - make sure there is metadata available before atempting to mux it with a recording
(cherry picked from commit ed5d7e4977f0090f215898a297ae8906d7e9e879)
Fix #1407 - skip unused ISO 8859 control codes.

This had the effect of placing unwanted spaces into various channel
names where the broadcaster was sending these control chars.

Thanks to Rene Herbrich for diagnosing this.
(cherry picked from commit 8a48fe8214df98fc7cd7f23fb210971921d6282c)
[PR-178] Close file pointer after the call to fb_size(fp)
(cherry picked from commit 5d2197c30fe4774f25ba9404287436d51a215578)
Fix #1423 - ensure that XMLTV grabber search does not crash.

It appears that if paths are duplicated in the PATH env variable the
internal search algorithm failed to detect this and could crash due to
an assert in the internal modlue registration code.
(cherry picked from commit 563b8f8c51a4fa0ee33c0ae8786f3fec84f70b4d)
Fix #1454 - Remove usage of non re-entrant strtok()

Thanks to Jaroslav Kysela <perex@perex.cz> for providing the initial fix.
(cherry picked from commit 86fac417c20734383e904e38169f1c88b42a6da9)
(cherry picked from commit 7d97d1f648ed720785eac367481d8e56ea8f1ff8)
(cherry picked from commit a420c83a0e0d2c31c2c15d0fec6fedc3f5a36dfe)
Fix #1453 - Fix autorec init issue (duplicate entries)

With previous init change, the scheduled events may be duplicated. Split
the dvr_autorec_init() to two phases:

1) load the autorec list
2) update the scheduled events after dvr db is initialized
(cherry picked from commit 4419dde14b4b98a9ee39d5b47b7fc9ca2f6a79d7)
muxers: make sure the default file descriptor for the passthrough muxer is an invalid one, not stdout.
(cherry picked from commit 442d69544530fb0deea4a524512db0a6a3899f1f)
muxers: make sure the recording has been started correctly before atempting to write packets to the muxer.
(cherry picked from commit 34ff0c20dba8413c2d833a01a78964089d2c70da)
muxers: make sure the default file descriptor for the matroska muxer is an invalid one, not stdout.
(cherry picked from commit 70f0801c9b30e0704835f0a085aaecb8c7a562f5)
muxers: make sure pvr muxer is freed
(cherry picked from commit bf59755681f87157447fe865f46f849348e3255d)