vlc.git
3 years agotest/url: move test for empty port-specification
Filip Roséen [Fri, 28 Oct 2016 08:49:44 +0000 (10:49 +0200)]
test/url: move test for empty port-specification

According to RFC3986, the port specifier does not have to contain
digits following the colon. This means that "http://example.com:" is a
valid URI, and that the relevant test should not be within the
"Invalid URIs"-group.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agotext/url: fix port handling in vlc_UrlParse
Filip Roséen [Fri, 28 Oct 2016 12:46:10 +0000 (14:46 +0200)]
text/url: fix port handling in vlc_UrlParse

Differences compared to the previous implementation:

 - accept URLs with empty port-specification (RFC3986, 3.2.3).

 - reject port-specification with leading sign (RFC3986 only
   allows *DIGIT).

refs #17555

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agodts_header: refactor
Thomas Guillem [Fri, 28 Oct 2016 12:47:13 +0000 (14:47 +0200)]
dts_header: refactor

Handle DTS magic sync code in only one place.

And rename b_dts_hd to b_substream. This boolean means that the dts frame is a
substream (extension of DTS-Core).

3 years agompeg/es: dts: use VLC_DTS_HEADER_SIZE for probe size
Thomas Guillem [Fri, 28 Oct 2016 10:04:59 +0000 (12:04 +0200)]
mpeg/es: dts: use VLC_DTS_HEADER_SIZE for probe size

3 years agompeg/es: fix dts probe in WAV
Thomas Guillem [Fri, 28 Oct 2016 10:00:22 +0000 (12:00 +0200)]
mpeg/es: fix dts probe in WAV

pi_samples is needed to check if the sync is followed by an other sync when the
WAV file has 0 padding.

3 years agotospdif: no S/PDIF header for DTS inside WAV
Thomas Guillem [Fri, 28 Oct 2016 09:15:08 +0000 (11:15 +0200)]
tospdif: no S/PDIF header for DTS inside WAV

If there is not enough room for it.

3 years agotospdif: fix buffer bundaries check
Thomas Guillem [Fri, 28 Oct 2016 08:51:01 +0000 (10:51 +0200)]
tospdif: fix buffer bundaries check

3 years agosmf: fix division by zero
Rémi Denis-Courmont [Fri, 28 Oct 2016 14:59:38 +0000 (17:59 +0300)]
smf: fix division by zero

3 years agoxa: fix divisions by zero
Rémi Denis-Courmont [Fri, 28 Oct 2016 14:11:55 +0000 (17:11 +0300)]
xa: fix divisions by zero

3 years agolua/intf/cli: make info command more versatile
Filip Roséen [Fri, 28 Oct 2016 13:53:50 +0000 (15:53 +0200)]
lua/intf/cli: make info command more versatile

Prior to this patch, the "info"-command could only be used to query
information related to the currently playing entity. These changes
allow the user to get information about other entities in the
playlist, based on the playlist-id.

fixes #17549

Signed-off-by: Pierre Ynard <linkfanel@yahoo.fr>
3 years agosmf: fix leak on invalid input
Rémi Denis-Courmont [Fri, 28 Oct 2016 13:39:28 +0000 (16:39 +0300)]
smf: fix leak on invalid input

3 years agovoc: fix division by zero
Rémi Denis-Courmont [Fri, 28 Oct 2016 13:15:55 +0000 (16:15 +0300)]
voc: fix division by zero

If buf[3] == 0xff, i_channels wraps to 0, and i_rate triggers SIGFPE.

3 years agomodules: remove useless parameters for static builds and fix them
Rémi Denis-Courmont [Fri, 28 Oct 2016 08:00:42 +0000 (11:00 +0300)]
modules: remove useless parameters for static builds and fix them

3 years agomodules: add --no-plugins-scan option to turn off directory scanning
Rémi Denis-Courmont [Fri, 28 Oct 2016 07:55:19 +0000 (10:55 +0300)]
modules: add --no-plugins-scan option to turn off directory scanning

With that options, plugins are *only* loaded from the cache. This
reduces the run time of libvlc_new() (about 2.5x on my system).

But new plugins won´t be picked up until the cache is regenerated.

3 years agomodules/bank: prevent null-pointer dereference in AllocatePluginFile
Filip Roséen [Fri, 28 Oct 2016 06:52:01 +0000 (08:52 +0200)]
modules/bank: prevent null-pointer dereference in AllocatePluginFile

Given that module_InitDynamic can fail and return a NULL pointer to
signal the error, we cannot unconditionally set data-members of the
referred to vlc_plugin_t.

These changes fixes the issue by introducing an explicit branch
related to initialization.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agoudp: fix comments
Rémi Denis-Courmont [Thu, 27 Oct 2016 20:57:12 +0000 (23:57 +0300)]
udp: fix comments

3 years agomodules: remove stray assertions
Rémi Denis-Courmont [Thu, 27 Oct 2016 20:07:40 +0000 (23:07 +0300)]
modules: remove stray assertions

These no longer make sense.

3 years agoFix indentation
Rémi Denis-Courmont [Thu, 27 Oct 2016 20:04:23 +0000 (23:04 +0300)]
Fix indentation

3 years agomodules: move modules count to plugin and simplify
Rémi Denis-Courmont [Thu, 27 Oct 2016 20:03:46 +0000 (23:03 +0300)]
modules: move modules count to plugin and simplify

3 years agomodules: fix potential NULL dereference
Rémi Denis-Courmont [Thu, 27 Oct 2016 19:57:40 +0000 (22:57 +0300)]
modules: fix potential NULL dereference

3 years agomodules: remove module_t.submodule and simplify
Rémi Denis-Courmont [Thu, 27 Oct 2016 19:35:57 +0000 (22:35 +0300)]
modules: remove module_t.submodule and simplify

3 years agocache: remove recursive function in save path
Rémi Denis-Courmont [Thu, 27 Oct 2016 19:25:20 +0000 (22:25 +0300)]
cache: remove recursive function in save path

With the removal of CacheMerge() (in ddf09a29), the relative order of
submodules within a plugin no longer has any significance. So there is
no need for this recursion trick anymore.

3 years agomodules: fix flawed logic in module_config_get()
Rémi Denis-Courmont [Thu, 27 Oct 2016 19:44:48 +0000 (22:44 +0300)]
modules: fix flawed logic in module_config_get()

3 years agomodules: inline CacheAdd() and run it only as needed
Rémi Denis-Courmont [Thu, 27 Oct 2016 18:58:01 +0000 (21:58 +0300)]
modules: inline CacheAdd() and run it only as needed

The per-directory plugins table is only used to save a new plugins
cache, in other words, in "cache reset" mode.

3 years agomodules: drop stale cache entries
Rémi Denis-Courmont [Thu, 27 Oct 2016 18:38:58 +0000 (21:38 +0300)]
modules: drop stale cache entries

There can only be one plugin file with a given path, so if the name
matches but the size or time does not, we know the entry is stale and
useless.

Also print an error if it happens.

3 years agomodules: allocate absolute path during cache loading
Rémi Denis-Courmont [Thu, 27 Oct 2016 18:30:44 +0000 (21:30 +0300)]
modules: allocate absolute path during cache loading

3 years agomodules: remove some stray code
Rémi Denis-Courmont [Thu, 27 Oct 2016 18:22:07 +0000 (21:22 +0300)]
modules: remove some stray code

3 years agoAndroid build fix
Rémi Denis-Courmont [Thu, 27 Oct 2016 18:41:25 +0000 (21:41 +0300)]
Android build fix

3 years agompg123: fix uninitialized read in DecodeBlock
Tristan Matthews [Thu, 27 Oct 2016 16:47:11 +0000 (12:47 -0400)]
mpg123: fix uninitialized read in DecodeBlock

Caught with valgrind.

3 years agomodules: load plugins for choice list on need basis
Rémi Denis-Courmont [Thu, 27 Oct 2016 16:59:06 +0000 (19:59 +0300)]
modules: load plugins for choice list on need basis

So far, they were loaded at start-up even if there was no request to
enumerate the choices.

3 years agoplugin: robustify loading cached plugin
Rémi Denis-Courmont [Thu, 27 Oct 2016 16:20:57 +0000 (19:20 +0300)]
plugin: robustify loading cached plugin

So far a cached plugin was loaded in memory, then the plugin
description was uselessly rebuilt from the loaded plugin, and then the
fuzzy "cache merge" was performed.

With this change, the cached plugin is loaded in memory, then the
plugin callbacks are matched by name. The description is not rebuilt
and the cache is not "merged".

3 years agomodule: store callback names rather than address
Rémi Denis-Courmont [Thu, 27 Oct 2016 16:03:34 +0000 (19:03 +0300)]
module: store callback names rather than address

Storing a relocatable pointer in the plugins cache made little sense.
In practice, it was only usable for comparison with NULL.

3 years agoplugin: match prototypes for callbacks as variable args
Rémi Denis-Courmont [Thu, 27 Oct 2016 12:15:13 +0000 (15:15 +0300)]
plugin: match prototypes for callbacks as variable args

Cast was missing, leading to mismatch.

3 years agoplugin: pass string identifier for callbacks
Rémi Denis-Courmont [Thu, 27 Oct 2016 12:01:36 +0000 (15:01 +0300)]
plugin: pass string identifier for callbacks

This would enable identifying unique callback functions within a plugin
even when the plugin is not loaded, and in particular within the
plugins cache file.

3 years agocache: factor common module saving
Rémi Denis-Courmont [Thu, 27 Oct 2016 15:44:53 +0000 (18:44 +0300)]
cache: factor common module saving

3 years agostream_filter: adf: require .adf extension
Tristan Matthews [Thu, 27 Oct 2016 05:19:30 +0000 (01:19 -0400)]
stream_filter: adf: require .adf extension

This should avoid some false positives.

3 years agourl: return an error if the port is not a number (fixes #17555)
Rémi Denis-Courmont [Thu, 27 Oct 2016 15:31:38 +0000 (18:31 +0300)]
url: return an error if the port is not a number (fixes #17555)

3 years agourl: test invalid port numbers
Rémi Denis-Courmont [Thu, 27 Oct 2016 15:31:29 +0000 (18:31 +0300)]
url: test invalid port numbers

3 years agocache: fix year 2038 problem and FILE_OFFSET_BITS dependency
Rémi Denis-Courmont [Thu, 27 Oct 2016 14:02:45 +0000 (17:02 +0300)]
cache: fix year 2038 problem and FILE_OFFSET_BITS dependency

3 years agocache: factor common module/submodule loading
Rémi Denis-Courmont [Thu, 27 Oct 2016 13:55:06 +0000 (16:55 +0300)]
cache: factor common module/submodule loading

3 years agocache: allow help string for submodules
Rémi Denis-Courmont [Thu, 27 Oct 2016 13:48:02 +0000 (16:48 +0300)]
cache: allow help string for submodules

This is the only remaining difference between modules and submodules.
I see no particular reasons not to support it; a submodule could
for instance provide a different URI scheme than the parent module.

3 years agocache: remove no-op
Rémi Denis-Courmont [Thu, 27 Oct 2016 13:44:36 +0000 (16:44 +0300)]
cache: remove no-op

3 years agomodules: remove OS/2 kludge
Rémi Denis-Courmont [Thu, 27 Oct 2016 13:05:39 +0000 (16:05 +0300)]
modules: remove OS/2 kludge

3 years agocontrib: tiff: use version 4.0.6
Steve Lhomme [Thu, 27 Oct 2016 06:28:10 +0000 (08:28 +0200)]
contrib: tiff: use version 4.0.6

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agocontrib: libxml2: don't disable debug in debug builds
Steve Lhomme [Wed, 26 Oct 2016 15:40:43 +0000 (17:40 +0200)]
contrib: libxml2: don't disable debug in debug builds

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agocontrib: glew: use the system package if possible
Steve Lhomme [Wed, 26 Oct 2016 15:40:04 +0000 (17:40 +0200)]
contrib: glew: use the system package if possible

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agocontrib: goom: use the system package if possible
Steve Lhomme [Wed, 26 Oct 2016 15:40:03 +0000 (17:40 +0200)]
contrib: goom: use the system package if possible

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agogettext: update to version 0.19.8
Rémi Denis-Courmont [Thu, 27 Oct 2016 11:18:30 +0000 (14:18 +0300)]
gettext: update to version 0.19.8

3 years agocontrib: zvbi: depend on png for building
Steve Lhomme [Wed, 26 Oct 2016 15:36:52 +0000 (17:36 +0200)]
contrib: zvbi: depend on png for building

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agocontrib: soxr: use the proper cmake generator
Steve Lhomme [Wed, 26 Oct 2016 15:35:06 +0000 (17:35 +0200)]
contrib: soxr: use the proper cmake generator

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agocontribs: fix cmake target on Windows
Steve Lhomme [Wed, 26 Oct 2016 15:35:05 +0000 (17:35 +0200)]
contribs: fix cmake target on Windows

On Windows cmake build for a Visual Studio target if it's installed, no matter
what the target we want to build. Reverting to MSys makefiles allow normal
autotools builds to be used

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agoRevert "packetizer: mlp: flag discontinuity on timebase change"
Francois Cartegnie [Thu, 27 Oct 2016 11:06:57 +0000 (13:06 +0200)]
Revert "packetizer: mlp: flag discontinuity on timebase change"

This reverts commit 81703617662aa32a173d5758bf7327a8502c1541.

3 years agoRevert "packetizer: dts: notify discontinuities on timebase change"
Francois Cartegnie [Thu, 27 Oct 2016 11:06:41 +0000 (13:06 +0200)]
Revert "packetizer: dts: notify discontinuities on timebase change"

This reverts commit 4e18fe02108f263442ba19e7bb3ff557c5376556.

3 years agoRevert "packetizer: a52: flag discontinuity on timebase change"
Francois Cartegnie [Thu, 27 Oct 2016 11:06:25 +0000 (13:06 +0200)]
Revert "packetizer: a52: flag discontinuity on timebase change"

This reverts commit 5bff0f42104e21ff503d13b50b45660938af56f0.

3 years agoRevert "packetizer: mpeg4audio: flag discontinuity on timebase change"
Francois Cartegnie [Thu, 27 Oct 2016 11:06:13 +0000 (13:06 +0200)]
Revert "packetizer: mpeg4audio: flag discontinuity on timebase change"

This reverts commit ef6dd48f8ef753c87d445ec6853baf0b61b573ca.

3 years agoRevert "packetizer: mpegaudio: flag discontinuity on timebase change"
Francois Cartegnie [Thu, 27 Oct 2016 11:04:32 +0000 (13:04 +0200)]
Revert "packetizer: mpegaudio: flag discontinuity on timebase change"

This reverts commit ce02dd5c0defc8f15b93f8b6c6b986cfaadfa50e.

3 years agocontrib: use pkg from contribs before the user ones
Steve Lhomme [Wed, 26 Oct 2016 15:32:27 +0000 (17:32 +0200)]
contrib: use pkg from contribs before the user ones

If the user directories contain an older or otherwise inadequate
package version, contrib will rebuild a suitable version. If it is a
dependency of another contrib package, then pkg-config needs to look up
the contrib version before the user version.

This behaviour is already what happens for system packages in the
default pkg-config directories: they are processed after the
directories from the environment variable.

(Rewritten description)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
3 years agomodules: make module_Map() lock-less on fast path
Rémi Denis-Courmont [Thu, 27 Oct 2016 10:11:27 +0000 (13:11 +0300)]
modules: make module_Map() lock-less on fast path

No more locking if the module requested is already loaded.

3 years agomodules: move module handle and path to plugin structure
Rémi Denis-Courmont [Thu, 27 Oct 2016 07:45:13 +0000 (10:45 +0300)]
modules: move module handle and path to plugin structure

3 years agomodules: move text domain to plugin
Rémi Denis-Courmont [Thu, 27 Oct 2016 07:18:10 +0000 (10:18 +0300)]
modules: move text domain to plugin

Separate text domains for modules in the same library would not make
much sense, and it was never supported.

3 years agomodules: factor vlc_plugin_t creation
Rémi Denis-Courmont [Thu, 27 Oct 2016 07:12:49 +0000 (10:12 +0300)]
modules: factor vlc_plugin_t creation

3 years agomodules: move configuration items into vlc_plugin_t
Rémi Denis-Courmont [Wed, 26 Oct 2016 21:10:53 +0000 (00:10 +0300)]
modules: move configuration items into vlc_plugin_t

3 years agocache: reorder submodules and configuration
Rémi Denis-Courmont [Wed, 26 Oct 2016 19:56:03 +0000 (22:56 +0300)]
cache: reorder submodules and configuration

This will be useful for later changes.

3 years agocache: recompute items and bool items counters
Rémi Denis-Courmont [Wed, 26 Oct 2016 19:49:45 +0000 (22:49 +0300)]
cache: recompute items and bool items counters

Recomputing the values is cheap and ensures that they are correct.
Incorrect values could trigger buffer overflows in the configuration
code.

3 years agomodules: introduce vlc_plugin_t, remove module_cache_t
Rémi Denis-Courmont [Wed, 26 Oct 2016 16:22:55 +0000 (19:22 +0300)]
modules: introduce vlc_plugin_t, remove module_cache_t

This introduces a dedicated compound type for module containers
(i.e. plug-in shared libraries or statically linked module
descriptors), or plug-in. A plug-in can contain any number of
modules. The type describes plug-ins regardless of whence they came
from, libvlccore ("main"), static linking, dynamic linking or the
plug-ins cache.

Previously, plug-ins from the cache were described by module_cache_t,
only during the loading phase, while module_t was (ab)used to describe
loaded or cached plug-ins. Ultimately, that allows moving properties of
plug-ins out of the module structure where they do not really belong,
since there can be multiple modules per plug-ins.

3 years agocache: reorder to avoid forward declarations
Rémi Denis-Courmont [Wed, 26 Oct 2016 13:37:31 +0000 (16:37 +0300)]
cache: reorder to avoid forward declarations

3 years agomux: ts: reword stream selection
Francois Cartegnie [Mon, 24 Oct 2016 14:40:56 +0000 (16:40 +0200)]
mux: ts: reword stream selection

3 years agopacketizer: mpeg4video: fix unused vars warnings
Francois Cartegnie [Wed, 26 Oct 2016 17:10:42 +0000 (19:10 +0200)]
packetizer: mpeg4video: fix unused vars warnings

3 years agopacketizer: mlp: flag discontinuity on timebase change
Francois Cartegnie [Wed, 26 Oct 2016 13:52:51 +0000 (15:52 +0200)]
packetizer: mlp: flag discontinuity on timebase change

3 years agopacketizer: mlp: forward discontinuities
Francois Cartegnie [Wed, 26 Oct 2016 13:50:37 +0000 (15:50 +0200)]
packetizer: mlp: forward discontinuities

3 years agopacketizer: mlp: add draining and handle discontinuities
Francois Cartegnie [Wed, 26 Oct 2016 13:48:57 +0000 (15:48 +0200)]
packetizer: mlp: add draining and handle discontinuities

3 years agopacketizer: dts: implement draining and handle discontinuities
Francois Cartegnie [Wed, 26 Oct 2016 13:41:36 +0000 (15:41 +0200)]
packetizer: dts: implement draining and handle discontinuities

3 years agopacketizer: dts: notify discontinuities on timebase change
Francois Cartegnie [Wed, 26 Oct 2016 13:38:50 +0000 (15:38 +0200)]
packetizer: dts: notify discontinuities on timebase change

3 years agopacketizer: dts: forward discontinuities
Francois Cartegnie [Wed, 26 Oct 2016 13:37:13 +0000 (15:37 +0200)]
packetizer: dts: forward discontinuities

3 years agopacketizer: a52: add draining and handle discontinuities
Francois Cartegnie [Wed, 26 Oct 2016 12:50:49 +0000 (14:50 +0200)]
packetizer: a52: add draining and handle discontinuities

3 years agopacketizer: a52: flag discontinuity on timebase change
Francois Cartegnie [Wed, 26 Oct 2016 12:42:51 +0000 (14:42 +0200)]
packetizer: a52: flag discontinuity on timebase change

3 years agopacketizer: a52: forward discontinuities
Francois Cartegnie [Wed, 26 Oct 2016 12:41:45 +0000 (14:41 +0200)]
packetizer: a52: forward discontinuities

3 years agopacketizer: mpeg4audio: implement draining and handle discontinuities
Francois Cartegnie [Wed, 26 Oct 2016 12:01:17 +0000 (14:01 +0200)]
packetizer: mpeg4audio: implement draining and handle discontinuities

3 years agopacketizer: mpeg4audio: flag discontinuity on timebase change
Francois Cartegnie [Tue, 25 Oct 2016 11:20:39 +0000 (13:20 +0200)]
packetizer: mpeg4audio: flag discontinuity on timebase change

3 years agopacketizer: mpeg4audio: forward discontinuities
Francois Cartegnie [Tue, 25 Oct 2016 11:20:12 +0000 (13:20 +0200)]
packetizer: mpeg4audio: forward discontinuities

3 years agopacketizer_helper: implement draining
Francois Cartegnie [Wed, 26 Oct 2016 08:36:22 +0000 (10:36 +0200)]
packetizer_helper: implement draining

3 years agopacketizer: mpegaudio: implement draining and proper discontinuity handling
Francois Cartegnie [Wed, 26 Oct 2016 10:08:56 +0000 (12:08 +0200)]
packetizer: mpegaudio: implement draining and proper discontinuity handling

3 years agopacketizer: mpegaudio: flag discontinuity on timebase change
Francois Cartegnie [Tue, 25 Oct 2016 09:22:58 +0000 (11:22 +0200)]
packetizer: mpegaudio: flag discontinuity on timebase change

also resets internal timebase on backward seek

3 years agopacketizer: mpegaudio: remove unused var
Francois Cartegnie [Tue, 25 Oct 2016 09:06:17 +0000 (11:06 +0200)]
packetizer: mpegaudio: remove unused var

3 years agopacketizer: mpegaudio: forward discontinuities
Francois Cartegnie [Tue, 25 Oct 2016 09:05:39 +0000 (11:05 +0200)]
packetizer: mpegaudio: forward discontinuities

3 years agoblock_helper: add tail pointer for inserts
Francois Cartegnie [Wed, 26 Oct 2016 14:45:17 +0000 (16:45 +0200)]
block_helper: add tail pointer for inserts

3 years agovlc_block_helper: use block_ChainRelease for chain release
Francois Cartegnie [Wed, 26 Oct 2016 13:56:26 +0000 (15:56 +0200)]
vlc_block_helper: use block_ChainRelease for chain release

3 years agodemux_chained: fix stream leak
Thomas Guillem [Wed, 26 Oct 2016 16:29:55 +0000 (18:29 +0200)]
demux_chained: fix stream leak

This leak could happen when the stream_fifo was closed during the creation of
the demux from the demux_chained thread.

3 years agodemux/mkv: use infinite chapter as last resort
Filip Roséen [Sat, 22 Oct 2016 02:54:12 +0000 (04:54 +0200)]
demux/mkv: use infinite chapter as last resort

This fixes issues where you try to seek in an mkv that does not have a
duration (ie. where the last chapter just goes on and on), and it is
especially important for mkvs that only contains one chapter (that
goes on forever).

Prior to this patch these would not play at all.

Signed-off-by: Steve Lhomme <robux4@videolabs.io>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agodemux/mkv: do not calculate duration for infinite clusters
Filip Roséen [Sat, 22 Oct 2016 02:54:11 +0000 (04:54 +0200)]
demux/mkv: do not calculate duration for infinite clusters

It does not make sense trying to calculate the duration for something
for which there is no end, as such we should protect ourselves from
wasting our breath.

Signed-off-by: Steve Lhomme <robux4@videolabs.io>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agodemux/mkv: only convert duration if it has a proper value
Filip Roséen [Sat, 22 Oct 2016 02:54:10 +0000 (04:54 +0200)]
demux/mkv: only convert duration if it has a proper value

matroska_segment_c::i_duration defaults to having a value of "-1", and
we should of course not try to convert the duration from the unit
within an mkv to ours _unless_ we have initialized it (through the
value of a KaxDuration).

These changes fixes that.

Signed-off-by: Steve Lhomme <robux4@videolabs.io>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agodemux/mkv: do not give up if BlockGet fails
Filip Roséen [Sat, 22 Oct 2016 02:54:09 +0000 (04:54 +0200)]
demux/mkv: do not give up if BlockGet fails

We should not completely give up just because we cannot read the next
block, instead we simply break out of the loop, mark the range that we
could search as searched, and get on with our day.

Signed-off-by: Steve Lhomme <robux4@videolabs.io>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agodemux/mkv: fix assert on infinite clusters
Filip Roséen [Sat, 22 Oct 2016 02:54:08 +0000 (04:54 +0200)]
demux/mkv: fix assert on infinite clusters

A cluster can have an infinite size, and if so the result of invoking
KaxCluster::GetEndPosition is undefined. These changes simply make
sure that we do not query clusters for their size, if they are not
finite in size.

fixes #17537

Signed-off-by: Steve Lhomme <robux4@videolabs.io>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agolua/intf/cli: fix invalid concatenation of empty string
Filip Roséen [Wed, 26 Oct 2016 14:18:17 +0000 (16:18 +0200)]
lua/intf/cli: fix invalid concatenation of empty string

If an item lacks a name the value of "item.name" is nil, meaning that
it is an error trying to use it during concatenation.

These changes simply falls back to "item.path" in case the mentioned
metadata is missing.

fixes #17545

Signed-off-by: Pierre Ynard <linkfanel@yahoo.fr>
3 years agonewgrounds.lua: fix typo in error message
Pierre Ynard [Wed, 26 Oct 2016 13:51:14 +0000 (15:51 +0200)]
newgrounds.lua: fix typo in error message

3 years agoandroid/utils: clear the surface starting Android M
Thomas Guillem [Wed, 26 Oct 2016 13:05:50 +0000 (15:05 +0200)]
android/utils: clear the surface starting Android M

3 years agoandroid/utils: fail early if there is no private libs
Thomas Guillem [Wed, 26 Oct 2016 13:01:27 +0000 (15:01 +0200)]
android/utils: fail early if there is no private libs

This will be soon the most common case.

3 years agonewgrounds.lua: new playlist parser script
Pierre Ynard [Wed, 26 Oct 2016 13:01:15 +0000 (15:01 +0200)]
newgrounds.lua: new playlist parser script

By private request. Beware #17540

3 years agocache: remove CacheDelete() and simplify
Rémi Denis-Courmont [Wed, 26 Oct 2016 11:33:36 +0000 (14:33 +0300)]
cache: remove CacheDelete() and simplify

CacheSave() already atomically replaces the cache file (or deletes it,
then non-atomically replaces it on retarded systems). There are no
needs to delete it explicitly another time first.

3 years agocue.lua: improve probing
Pierre Ynard [Wed, 26 Oct 2016 10:10:42 +0000 (12:10 +0200)]
cue.lua: improve probing

Ref. #17488