vlc.git
4 years agomacOS: Move VLCTimeField out of misc
Marvin Scholz [Thu, 1 Jun 2017 09:59:51 +0000 (11:59 +0200)]
macOS: Move VLCTimeField out of misc

This moves the VLCTimeField class in their own files, out of misc.

4 years agomacOS: Remove unnecessary styling from VLCTimeField
Marvin Scholz [Thu, 1 Jun 2017 09:35:50 +0000 (11:35 +0200)]
macOS: Remove unnecessary styling from VLCTimeField

If this is desired, it should be done on a case-by-case base and not
included in this subclass, as it is useful in a number of different
locations where the click to show alternate time functionality is
desired.

4 years agodirect3d9: Don't copy from an odd offset
Hugo Beauzée-Luyssen [Wed, 31 May 2017 16:31:19 +0000 (18:31 +0200)]
direct3d9: Don't copy from an odd offset

This can (and often will) make StretchRect fail

4 years agoqt: video_widget: Fetch the container widget size
Hugo Beauzée-Luyssen [Wed, 31 May 2017 14:37:43 +0000 (16:37 +0200)]
qt: video_widget: Fetch the container widget size

This fixes occasional weird positioning of the video in the video widget on windows

4 years agomacOS: Move VLCOpenTextField out of misc
Marvin Scholz [Thu, 1 Jun 2017 06:40:35 +0000 (08:40 +0200)]
macOS: Move VLCOpenTextField out of misc

The VLCOpenTextField is only ever used in the VLCOpenWindowController.

4 years agoqt: remove false warning
Thomas Guillem [Wed, 31 May 2017 14:16:32 +0000 (16:16 +0200)]
qt: remove false warning

These values are valid.

4 years agoqt: save effects and filters on user request
Thomas Guillem [Tue, 23 May 2017 08:25:46 +0000 (10:25 +0200)]
qt: save effects and filters on user request

Fixes #6873

4 years agoqt: don't save SyncControls preferences
Thomas Guillem [Tue, 23 May 2017 17:39:35 +0000 (19:39 +0200)]
qt: don't save SyncControls preferences

Ref #6873

4 years agoqt: refactor ChangeVFiltersString
Thomas Guillem [Tue, 23 May 2017 17:37:52 +0000 (19:37 +0200)]
qt: refactor ChangeVFiltersString

Ref #6873

4 years agoqt: refactor ChangeAFiltersString
Thomas Guillem [Tue, 23 May 2017 17:19:27 +0000 (19:19 +0200)]
qt: refactor ChangeAFiltersString

Ref #6873

4 years agoqt: set setFilterOption non static
Thomas Guillem [Tue, 23 May 2017 17:14:33 +0000 (19:14 +0200)]
qt: set setFilterOption non static

Ref #6873

4 years agoqt: duplicate video filters options in the playlist
Thomas Guillem [Mon, 29 May 2017 09:59:59 +0000 (11:59 +0200)]
qt: duplicate video filters options in the playlist

Since we don't want to always save options anymore, we need a parent object to
store options that won't be destroyed (in contrary to the vout that can be
restarted/destroyed).

Ref #6873

4 years agoqt: set video filters options directly in all vouts
Thomas Guillem [Mon, 29 May 2017 09:57:18 +0000 (11:57 +0200)]
qt: set video filters options directly in all vouts

4 years agoqt: refactor ExtVideo::setFilterOption
Thomas Guillem [Tue, 30 May 2017 15:30:43 +0000 (17:30 +0200)]
qt: refactor ExtVideo::setFilterOption

4 years agoqt: apply filters change on all vouts
Thomas Guillem [Tue, 30 May 2017 15:14:22 +0000 (17:14 +0200)]
qt: apply filters change on all vouts

4 years agoqt: add MainInputManager::getVouts
Thomas Guillem [Tue, 30 May 2017 15:10:31 +0000 (17:10 +0200)]
qt: add MainInputManager::getVouts

4 years agoqt: save/retrieve video filters to/from the playlist
Thomas Guillem [Mon, 29 May 2017 09:55:23 +0000 (11:55 +0200)]
qt: save/retrieve video filters to/from the playlist

4 years agoqt: fix filter list false positives
Thomas Guillem [Tue, 30 May 2017 14:31:25 +0000 (16:31 +0200)]
qt: fix filter list false positives

4 years agoqt: remove forward declaration
Thomas Guillem [Wed, 24 May 2017 07:56:50 +0000 (09:56 +0200)]
qt: remove forward declaration

4 years agoqt: fix usage of a released aout object
Thomas Guillem [Wed, 31 May 2017 15:28:37 +0000 (17:28 +0200)]
qt: fix usage of a released aout object

4 years agoqt: get audio filters from the playlist
Thomas Guillem [Wed, 31 May 2017 14:38:32 +0000 (16:38 +0200)]
qt: get audio filters from the playlist

4 years agovout: trigger filters commands
Thomas Guillem [Wed, 24 May 2017 08:23:53 +0000 (10:23 +0200)]
vout: trigger filters commands

The vout now duplicates every command variables of spawned filters in order
to trigger events directly from the vout.

4 years agovariables: add var_GetAllNames
Thomas Guillem [Tue, 30 May 2017 09:02:41 +0000 (11:02 +0200)]
variables: add var_GetAllNames

4 years agoaout: save filter settings in the parent object
Thomas Guillem [Tue, 30 May 2017 16:25:47 +0000 (18:25 +0200)]
aout: save filter settings in the parent object

For now, the parent object is always the playlist.

Ref #6873

4 years agoplaylist: create filters variables
Thomas Guillem [Mon, 29 May 2017 09:49:55 +0000 (11:49 +0200)]
playlist: create filters variables

Ref #6873

4 years agovlc_codec: fix confusing parameter in decoder_NewAudioBuffer
Francois Cartegnie [Wed, 31 May 2017 12:09:21 +0000 (14:09 +0200)]
vlc_codec: fix confusing parameter in decoder_NewAudioBuffer

4 years agoFix make dist after ID3Genres.h move to meta_engine
Nicolas Chauvet [Wed, 31 May 2017 10:43:17 +0000 (12:43 +0200)]
Fix make dist after ID3Genres.h move to meta_engine

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
Signed-off-by: Francois Cartegnie <fcvlcdev@free.fr>
4 years agocodec: flac: fix heap write overflow on frame format change
Francois Cartegnie [Wed, 31 May 2017 11:02:29 +0000 (13:02 +0200)]
codec: flac: fix heap write overflow on frame format change

4 years agometa: ID3: set ID3_tag_to_metatype static
Thomas Guillem [Wed, 31 May 2017 08:01:45 +0000 (10:01 +0200)]
meta: ID3: set ID3_tag_to_metatype static

4 years agodshow: Fix CapturePin initialization
Hugo Beauzée-Luyssen [Tue, 30 May 2017 16:39:51 +0000 (18:39 +0200)]
dshow: Fix CapturePin initialization

Regression introduced in e6b343dd68854fc9de383e8fb44c716221f8d403

4 years agodemux: ttml: fix utf8 doctype probing
Francois Cartegnie [Tue, 30 May 2017 11:36:55 +0000 (13:36 +0200)]
demux: ttml: fix utf8 doctype probing

4 years agottml: correct region style resolution order and process region referential styling
Remita Amine [Sat, 20 May 2017 18:51:55 +0000 (19:51 +0100)]
ttml: correct region style resolution order and process region referential styling

Signed-off-by: Francois Cartegnie <fcvlcdev@free.fr>
4 years agoaout: fix replaygain
Francois Cartegnie [Fri, 26 May 2017 19:03:25 +0000 (21:03 +0200)]
aout: fix replaygain

4 years agovlc_arrays: fix missing parenthesis
Thomas Guillem [Tue, 30 May 2017 08:55:36 +0000 (10:55 +0200)]
vlc_arrays: fix missing parenthesis

4 years agoqt: fix build when QT5_HAS_XCB but !QT5_HAS_X11
Tristan Matthews [Mon, 29 May 2017 19:27:17 +0000 (15:27 -0400)]
qt: fix build when QT5_HAS_XCB but !QT5_HAS_X11

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
4 years agomacosx: Fix VLC.app build
David Fuhrmann [Mon, 29 May 2017 19:56:05 +0000 (21:56 +0200)]
macosx: Fix VLC.app build

Fixes build of VLC.app bundle, by making sure to copy all
needed ressources.

4 years agottml: use explicit 64/32-bits types
Rémi Denis-Courmont [Mon, 29 May 2017 19:23:24 +0000 (22:23 +0300)]
ttml: use explicit 64/32-bits types

4 years agodemux: mp4: parse 3GPP ID3
Francois Cartegnie [Mon, 29 May 2017 18:01:42 +0000 (20:01 +0200)]
demux: mp4: parse 3GPP ID3

Untested

4 years agodemux: es: use refactored id3 parser
Francois Cartegnie [Mon, 29 May 2017 18:01:56 +0000 (20:01 +0200)]
demux: es: use refactored id3 parser

4 years agometa: ID3: load replaygain into meta
Francois Cartegnie [Mon, 29 May 2017 17:48:19 +0000 (19:48 +0200)]
meta: ID3: load replaygain into meta

4 years agodemux: mp4: move ID3 genres to meta
Francois Cartegnie [Mon, 29 May 2017 15:49:27 +0000 (17:49 +0200)]
demux: mp4: move ID3 genres to meta

4 years agosap: remove unused parameter
Rémi Denis-Courmont [Mon, 29 May 2017 15:39:44 +0000 (18:39 +0300)]
sap: remove unused parameter

4 years agosd: fix inverted parameter (fixes #18372)
Rémi Denis-Courmont [Mon, 29 May 2017 15:39:34 +0000 (18:39 +0300)]
sd: fix inverted parameter (fixes #18372)

4 years agosap: use vlc_memstream, fix heap overflow
Rémi Denis-Courmont [Mon, 29 May 2017 15:36:54 +0000 (18:36 +0300)]
sap: use vlc_memstream, fix heap overflow

4 years agolibmpeg2: fix NULl deref on vout failure (fixes #18366)
Rémi Denis-Courmont [Sun, 28 May 2017 11:50:42 +0000 (14:50 +0300)]
libmpeg2: fix NULl deref on vout failure (fixes #18366)

This ensures that the synchro object is allocated regardless of the
video output state.

Note that they are probably other ways to trigger similar NULL
dereference. It is highly questionable that this plugin should remain
in the tree with all its bugs and no upstream (libmpeg2) maintainance.

4 years agosynchro: privatize inside libmpeg2 plugin
Rémi Denis-Courmont [Sun, 28 May 2017 11:40:08 +0000 (14:40 +0300)]
synchro: privatize inside libmpeg2 plugin

This set of "helpers" is only used by the libmpeg2 plugin, and was not
exposed to out-of-tree-plugins. There is apparently no point keeping it
inside the core.

4 years agodemux: mp4: set replay gain
Francois Cartegnie [Mon, 29 May 2017 14:31:32 +0000 (16:31 +0200)]
demux: mp4: set replay gain

4 years agodemux: mp4: store meta on Open()
Francois Cartegnie [Mon, 29 May 2017 14:02:10 +0000 (16:02 +0200)]
demux: mp4: store meta on Open()

4 years agodemux: mp4: extract iTunesInfo
Francois Cartegnie [Mon, 29 May 2017 13:42:40 +0000 (15:42 +0200)]
demux: mp4: extract iTunesInfo

4 years agoqt: remove "Black Slot" puzzle option
Thomas Guillem [Mon, 29 May 2017 14:17:33 +0000 (16:17 +0200)]
qt: remove "Black Slot" puzzle option

This option had been removed from the filter module in 2013, see
4b4f62a0e0114a638d3234db81bd02b1513a39d6.

Fixes #15418

4 years agoinput: InputGetExtraFiles: handle rar splits
Filip Roséen [Thu, 25 May 2017 19:58:05 +0000 (21:58 +0200)]
input: InputGetExtraFiles: handle rar splits

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agoinput: allow InputGetExtraFiles to force an access
Filip Roséen [Thu, 25 May 2017 19:58:04 +0000 (21:58 +0200)]
input: allow InputGetExtraFiles to force an access

As extensions, such as .001, are heavily coupled with access/concat,
this allows a certain pattern to force a specific access module to
handle the incoming data.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agoinput: InputGetExtraFilesPattern: include scheme in concat-list entries
Filip Roséen [Thu, 25 May 2017 20:08:58 +0000 (22:08 +0200)]
input: InputGetExtraFilesPattern: include scheme in concat-list entries

This allows for easier implementation for modules using the
concat-list, as it can assume that all entries can be passed directly
to functions such as vlc_stream_NewURL (as they are now valid URIs).

These changes also makes it so that the contents of concat-list
matches that of the documentation, as it uses the notion "input URLs".

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agoinput: InputGetExtraFiles: refactor
Filip Roséen [Thu, 25 May 2017 19:58:02 +0000 (21:58 +0200)]
input: InputGetExtraFiles: refactor

These changes allow for an implementation that is a little bit easier
to read, and maintain.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agoinput: decoder: fix end of preroll on discontinuity
Francois Cartegnie [Fri, 19 May 2017 08:22:29 +0000 (10:22 +0200)]
input: decoder: fix end of preroll on discontinuity

End of preroll time was not updated properly.

Initial discontinuities were notified
through es_out/input_DecoderDiscontinuity
79cb45a41bdeaca63eb5fa2f3c53913ce463c6a5
using a forged empty block with discontinuity
flag.

Current decoders/demuxers discontinuity flag
is set on first block after discontinuity, and
is no longer empty data. We need to test for
this.

refs #18245
First spu dropped on preroll (preroll > INT_MIN)
(due to another special case/preroll incompatibility)

4 years agovlc_stream_ReadLine: fix trimming 8-bits lines (fixes #18364)
Rémi Denis-Courmont [Fri, 26 May 2017 19:37:31 +0000 (22:37 +0300)]
vlc_stream_ReadLine: fix trimming 8-bits lines (fixes #18364)

The conversion from UTF-16 to UTF-8 could (until a few days ago) fail
before the end. In that case, the appended nul terminator would not be
converted. A nul terminator is anyway always appended after conversion
and trimming.

If conversion failed on the first character, that nul terminator would
be written at a negative offset, leading to heap buffer "underflow" and
memory corruption. This was fixed but lead to a mismatch in the value of
i_lines depending on the character width.

This change removes the useless pre-conversion nul terminator, and thus
makes trimming work again with single byte character width work. This
fixes reading text files formatted with MS-DOS line endings.

4 years agodemux: es: add replaygain from ID3
Francois Cartegnie [Fri, 26 May 2017 16:07:47 +0000 (18:07 +0200)]
demux: es: add replaygain from ID3

4 years agometa: ID3: split string conversion
Francois Cartegnie [Fri, 26 May 2017 14:39:06 +0000 (16:39 +0200)]
meta: ID3: split string conversion

4 years agovideo_chroma: chain: fix uninitialized variable
Thomas Guillem [Fri, 26 May 2017 13:25:44 +0000 (15:25 +0200)]
video_chroma: chain: fix uninitialized variable

4 years agommal/deinterlace: fix priority
Thomas Guillem [Fri, 26 May 2017 13:11:17 +0000 (15:11 +0200)]
mmal/deinterlace: fix priority

Since deinterlace filters are loaded manually.

4 years agoi420_rgb: fix MMX and non optimized capabilities
Thomas Guillem [Fri, 26 May 2017 13:08:13 +0000 (15:08 +0200)]
i420_rgb: fix MMX and non optimized capabilities

4 years agocodec: ttml: fix white space stripping
Francois Cartegnie [Fri, 26 May 2017 10:26:40 +0000 (12:26 +0200)]
codec: ttml: fix white space stripping

Must not depend of ttml style presence

4 years agodemux: ttml: probe document header less xml
Francois Cartegnie [Fri, 26 May 2017 09:00:06 +0000 (11:00 +0200)]
demux: ttml: probe document header less xml

4 years agomux: mp4: set single field duration
Francois Cartegnie [Fri, 26 May 2017 08:08:46 +0000 (10:08 +0200)]
mux: mp4: set single field duration

4 years agoflac: use library defined constant
Tristan Matthews [Thu, 25 May 2017 00:35:04 +0000 (20:35 -0400)]
flac: use library defined constant

4 years agovlc_stream_ReadLine: fix trimming
Rémi Denis-Courmont [Wed, 24 May 2017 19:07:05 +0000 (22:07 +0300)]
vlc_stream_ReadLine: fix trimming

Removal of CR or LF final characters relied on the off-by-one bug fixed
in the previous changest, and no longer works. This adjusts it
accordingly.

4 years agovlc_stream_ReadLine: fix off-by-one
Rémi Denis-Courmont [Wed, 24 May 2017 16:47:12 +0000 (19:47 +0300)]
vlc_stream_ReadLine: fix off-by-one

Do not erase the last converted byte. This bug has apparently existed
ever since UTF-16 support was added.

If the conversion fails, this bug resulted in a heap underflow (writing
zero right before the beginning of the buffer).

4 years agovlc_stream_ReadLine(): improve error reporting
Rémi Denis-Courmont [Wed, 24 May 2017 16:43:39 +0000 (19:43 +0300)]
vlc_stream_ReadLine(): improve error reporting

4 years agocontribs: microdns: Bump to 0.0.7
Hugo Beauzée-Luyssen [Wed, 24 May 2017 14:06:22 +0000 (16:06 +0200)]
contribs: microdns: Bump to 0.0.7

4 years agomacosx: Remove Makefile recursion, change xib compilation
David Fuhrmann [Sat, 20 May 2017 14:04:24 +0000 (16:04 +0200)]
macosx: Remove Makefile recursion, change xib compilation

xib compilation is changed to be not triggered if macosx module
is not built.

4 years agoRevert "subtitle: Fix potential memory leaks"
Hugo Beauzée-Luyssen [Wed, 24 May 2017 10:35:34 +0000 (12:35 +0200)]
Revert "subtitle: Fix potential memory leaks"

This reverts commit c2e45c4ecf2d51820dfe095d89e8b9379c8df4ca.

4 years agodirect3d9: Fix spu texture mapping
Hugo Beauzée-Luyssen [Tue, 23 May 2017 17:57:17 +0000 (19:57 +0200)]
direct3d9: Fix spu texture mapping

4 years agoqt: remove postproc menus
Jean-Baptiste Kempf [Tue, 23 May 2017 16:31:36 +0000 (18:31 +0200)]
qt: remove postproc menus

Postproc is almost always useless nowadays and does not work in most
cases.

4 years agodecoder: pass cc sub decoders reorder depth through QueueCC
Francois Cartegnie [Tue, 23 May 2017 16:09:40 +0000 (18:09 +0200)]
decoder: pass cc sub decoders reorder depth through QueueCC

no comment

4 years agocodec: ttml: compute sizes from cells (fix #18347)
Francois Cartegnie [Tue, 23 May 2017 09:07:16 +0000 (11:07 +0200)]
codec: ttml: compute sizes from cells (fix #18347)

4 years agocodec: ttml: fix empty dict check (fix #18260)
Francois Cartegnie [Tue, 23 May 2017 10:04:33 +0000 (12:04 +0200)]
codec: ttml: fix empty dict check (fix #18260)

4 years agoplaylist/item: add_subitem_tree: fix next on flat playlist and empty node
Filip Roséen [Sun, 21 May 2017 19:34:41 +0000 (21:34 +0200)]
playlist/item: add_subitem_tree: fix next on flat playlist and empty node

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoes_format: memset() the whole structure
Rémi Denis-Courmont [Mon, 22 May 2017 17:51:56 +0000 (20:51 +0300)]
es_format: memset() the whole structure

4 years agoplaylist: ram: fix flawed logic
Rémi Denis-Courmont [Mon, 22 May 2017 16:22:53 +0000 (19:22 +0300)]
playlist: ram: fix flawed logic

4 years agoplaylist: fix null-deref if there is no aout
Thomas Guillem [Mon, 22 May 2017 13:58:20 +0000 (15:58 +0200)]
playlist: fix null-deref if there is no aout

4 years agoaccess: bluray: don't create demux on invalid es_out
Francois Cartegnie [Mon, 22 May 2017 10:11:25 +0000 (12:11 +0200)]
access: bluray: don't create demux on invalid es_out

4 years agoaccess: bluray: fix discontinuity on set_title
Francois Cartegnie [Mon, 22 May 2017 13:46:16 +0000 (15:46 +0200)]
access: bluray: fix discontinuity on set_title

4 years agoaccess: bluray: missing es_format_Init
Francois Cartegnie [Mon, 22 May 2017 12:42:14 +0000 (14:42 +0200)]
access: bluray: missing es_format_Init

4 years agoQt: fix audio filter typo
Jean-Baptiste Kempf [Mon, 22 May 2017 09:59:36 +0000 (11:59 +0200)]
Qt: fix audio filter typo

4 years agoinput info: use "video resolution" instead of "display resolution"
Jean-Baptiste Kempf [Mon, 22 May 2017 08:21:14 +0000 (10:21 +0200)]
input info: use "video resolution" instead of "display resolution"

Technically, this is not the "display resolution", since we don't know
what the display will be (zoom and unzoom)

4 years agodemux/playlist: itml: remove unused macros
Filip Roséen [Sun, 21 May 2017 18:49:08 +0000 (20:49 +0200)]
demux/playlist: itml: remove unused macros

Signed-off-by: Marvin Scholz <epirat07@gmail.com>
4 years agodemux/playlist: itml: remove macro FREE_ATT
Filip Roséen [Sun, 21 May 2017 18:49:07 +0000 (20:49 +0200)]
demux/playlist: itml: remove macro FREE_ATT

It is only being used at this specific location.

Signed-off-by: Marvin Scholz <epirat07@gmail.com>
4 years agodemux/playlist: itml: manual inline of FREE_ATT_KEY
Filip Roséen [Sun, 21 May 2017 18:49:06 +0000 (20:49 +0200)]
demux/playlist: itml: manual inline of FREE_ATT_KEY

As the macro is used once, there is no need for it to exist at all.

Signed-off-by: Marvin Scholz <epirat07@gmail.com>
4 years agodemux/playlist/itml: free_track: simplify
Filip Roséen [Sun, 21 May 2017 18:49:05 +0000 (20:49 +0200)]
demux/playlist/itml: free_track: simplify

There is no need for FREENULL of the data-members when the whole
object is being deallocated directly after.

Signed-off-by: Marvin Scholz <epirat07@gmail.com>
4 years agodemux/playlist: itml: do not halt parsing on unsupported track
Filip Roséen [Sun, 21 May 2017 18:49:04 +0000 (20:49 +0200)]
demux/playlist: itml: do not halt parsing on unsupported track

This change makes it so that a track without <key>Location</key> is
simply ignored, instead of it preventing further tracks within the
playlist to be parsed (as we should of course import as many tracks as
we possibly can, even if there are some we simply cannot handle).

Signed-off-by: Marvin Scholz <epirat07@gmail.com>
4 years agomisc/image: ImageRead: use vlc_format_Copy
Filip Roséen [Sun, 21 May 2017 18:50:24 +0000 (20:50 +0200)]
misc/image: ImageRead: use vlc_format_Copy

If the decoder allocates data within video_format_t.p_palette, the
previous implementation would result in a use-after-free (among other
issues) due to the ownership of said p_palette not being well-defined.

This fixes the issue by using video_format_Copy, so that the two fmts
do not refer to the same palette.

fixes: #18334

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agogui/qt: AddonsListModel::flags: fix disabling of addon
Filip Roséen [Sun, 21 May 2017 18:50:04 +0000 (20:50 +0200)]
gui/qt: AddonsListModel::flags: fix disabling of addon

In the affected path we would like to toggle so that the addon is in a
state where it is not enabled by removing that flag (if present), we
would however remove all flags of the addon as the right-hand side
expression will always evaluate to 0.

This fixes the issue by proper use of bitwise negate.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agocodec/stl: GroupParseTeletext: remove duplicate const
Filip Roséen [Sun, 21 May 2017 18:49:34 +0000 (20:49 +0200)]
codec/stl: GroupParseTeletext: remove duplicate const

This will silence a diagnostic related to duplicate const qualifier,
as well as removing the obvious redundance of such qualification.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoplaylist: playlist_NodeDeleteExplicit: fixup of comments
Filip Roséen [Sun, 21 May 2017 18:48:18 +0000 (20:48 +0200)]
playlist: playlist_NodeDeleteExplicit: fixup of comments

The usage of "next" in the second comment is plain wrong, as we are
dealing with a currently playing item, not an upcoming one. The first
comment is redundant.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoplaylist: forcefully delete children of writable parent
Filip Roséen [Sun, 21 May 2017 18:48:17 +0000 (20:48 +0200)]
playlist: forcefully delete children of writable parent

If a parent is writable, but has read-only children, the previous
implementation would not delete the children, while deletion of the
parent would go through.

Which would, of course, result in a leak of the children in question.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoplaylist: conditionally stop playlist on deletion of node
Filip Roséen [Sun, 21 May 2017 18:48:16 +0000 (20:48 +0200)]
playlist: conditionally stop playlist on deletion of node

This fixes a regression introduced by 1ab80a3, where playback would
not stop if a node was deleted through user-interaction.

As a solution, a new flag to playlist_NodeDeleteExplicit has been
introduced so that we can conditionally stop playback of a deleted
item if desired (there are cases where we do not want such mechanisms,
such as when dealing with deletions of empty nodes).

fixes: #18350

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoplaylist: playlist_NodeDelete: privatize forceful delete
Filip Roséen [Sun, 21 May 2017 18:48:15 +0000 (20:48 +0200)]
playlist: playlist_NodeDelete: privatize forceful delete

Only the core should have permission to do forceful deletion of
entities.

This patch removes a mostly static, from outside of the core, argument
to playlist_NodeDelete, while also making it safer to use as it was
previously possible for anything with access to the function to delete
read-only entities.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoplaylist/engine: RateOffsetCallback: add debug diagnostic
Filip Roséen [Sun, 21 May 2017 18:48:13 +0000 (20:48 +0200)]
playlist/engine: RateOffsetCallback: add debug diagnostic

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoplaylist/engine: RateOffsetCallback: refactor
Filip Roséen [Sun, 21 May 2017 18:48:12 +0000 (20:48 +0200)]
playlist/engine: RateOffsetCallback: refactor

Besides the shortening of the implementation, the refactor also make
sure that we return an error-code if var_SetFloat fails - instead of
silently pretending everything was ok.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoplaylist/engine: add missing include for vlc_arrays.h
Filip Roséen [Sun, 21 May 2017 18:48:11 +0000 (20:48 +0200)]
playlist/engine: add missing include for vlc_arrays.h

The affected translation-unit makes use things from vlc_arrays.h (such
as ARRAY_INIT), but did not directly include it.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>