vlc.git
4 years agomacOS: Use larger type for bookmark hours and minutes
Marvin Scholz [Fri, 19 May 2017 11:34:19 +0000 (13:34 +0200)]
macOS: Use larger type for bookmark hours and minutes

4 years agomacOS: Add ability to copy bookmarks
Marvin Scholz [Tue, 16 May 2017 19:11:23 +0000 (21:11 +0200)]
macOS: Add ability to copy bookmarks

4 years agomacOS: Move bookmark time calculation to helper method
Marvin Scholz [Tue, 16 May 2017 19:10:58 +0000 (21:10 +0200)]
macOS: Move bookmark time calculation to helper method

4 years agostream_out: rtp: simplify mpgv using annexb iterator
Francois Cartegnie [Sat, 20 May 2017 16:45:23 +0000 (18:45 +0200)]
stream_out: rtp: simplify mpgv using annexb iterator

4 years agostream_out: rtp: simplify h264 using annexb iterator
Francois Cartegnie [Sat, 20 May 2017 16:33:55 +0000 (18:33 +0200)]
stream_out: rtp: simplify h264 using annexb iterator

4 years agostream_out: rtpfmt: constify
Francois Cartegnie [Sat, 20 May 2017 17:00:11 +0000 (19:00 +0200)]
stream_out: rtpfmt: constify

4 years agoaccess: live555: restore reset_pcr and add conditional flush
Francois Cartegnie [Sat, 20 May 2017 10:32:24 +0000 (12:32 +0200)]
access: live555: restore reset_pcr and add conditional flush

4 years agoaccess: live555: bump frame buffer to 250k
Francois Cartegnie [Sat, 20 May 2017 10:31:16 +0000 (12:31 +0200)]
access: live555: bump frame buffer to 250k

not uncommon for 1080p h264

4 years agoaccess: live555: flag truncated/corrupted blocks
Francois Cartegnie [Sat, 20 May 2017 09:40:10 +0000 (11:40 +0200)]
access: live555: flag truncated/corrupted blocks

4 years agoaccess: live555: uninitialized offset
Francois Cartegnie [Fri, 19 May 2017 19:50:23 +0000 (21:50 +0200)]
access: live555: uninitialized offset

4 years agoaccess: live555: set dts to ts_invalid for video
Francois Cartegnie [Fri, 19 May 2017 17:41:08 +0000 (19:41 +0200)]
access: live555: set dts to ts_invalid for video

4 years agopacketizer: hevc: don't increment invalid dts
Francois Cartegnie [Sat, 20 May 2017 11:50:55 +0000 (13:50 +0200)]
packetizer: hevc: don't increment invalid dts

4 years agopacketizer: mpegvideo: don't increment invalid dts
Francois Cartegnie [Fri, 19 May 2017 17:49:18 +0000 (19:49 +0200)]
packetizer: mpegvideo: don't increment invalid dts

4 years agopacketizer: h264: don't increment missing dts
Francois Cartegnie [Fri, 19 May 2017 17:25:37 +0000 (19:25 +0200)]
packetizer: h264: don't increment missing dts

4 years agoaccess: live555: don't set invalid pcr
Francois Cartegnie [Fri, 19 May 2017 15:36:29 +0000 (17:36 +0200)]
access: live555: don't set invalid pcr

4 years agodemux: mp4: fix incorrect free
Francois Cartegnie [Fri, 19 May 2017 09:00:23 +0000 (11:00 +0200)]
demux: mp4: fix incorrect free

4 years agodemux: mp4: fix fwd null (cid #1408972)
Francois Cartegnie [Fri, 19 May 2017 08:58:20 +0000 (10:58 +0200)]
demux: mp4: fix fwd null (cid #1408972)

on failed alloc of 0 payload size

4 years agomacOS: Remove unused outlet in debug log window
Marvin Scholz [Fri, 19 May 2017 23:11:51 +0000 (01:11 +0200)]
macOS: Remove unused outlet in debug log window

4 years agoaccess/satip: add missing initialization of sys->tcp_sock
Filip Roséen [Fri, 19 May 2017 20:46:25 +0000 (22:46 +0200)]
access/satip: add missing initialization of sys->tcp_sock

As the object referred to by sys is allocated with calloc,
sys->tcp_sock will be equal to 0 if an error occurs prior to it being
assigned a value in satip_open (such as when encountering a malformed
URI).

This will cause the error clean-up to assume that tcp->tcp_sock refers
to an open file-descriptor, triggering an assert if no suck
file-descriptor exists or closing a fd that access/satip definitely
should not mess with.

fixes: #18344

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agoContribs: fetch libvpx from VideoLAN servers
Jean-Baptiste Kempf [Fri, 19 May 2017 13:25:42 +0000 (15:25 +0200)]
Contribs: fetch libvpx from VideoLAN servers

4 years agodemux/pva: Close: properly release allocated block-chain
Filip Roséen [Fri, 19 May 2017 12:44:30 +0000 (14:44 +0200)]
demux/pva: Close: properly release allocated block-chain

p_sys->p_es and p_sys->p_pes are treated as block-chains, and not as
single blocks. As such block_ChainRelease shall be used to release the
full chain, as block_Release will only release the front-most block.

fixes: #17997

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/avformat: CloseDemux: properly release allocated attachments
Filip Roséen [Fri, 19 May 2017 12:35:43 +0000 (14:35 +0200)]
demux/avformat: CloseDemux: properly release allocated attachments

The entries within p_sys->attachments are of course allocated with
vlc_input_attachment_New, meaning that they shall be released using
the corresponding vlc_input_attachment_Delete.

fixes: #18288

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux: mkv: fix initial seek discontinuity flag
Francois Cartegnie [Fri, 19 May 2017 08:49:43 +0000 (10:49 +0200)]
demux: mkv: fix initial seek discontinuity flag

refs #18245

4 years agoinput/control: INPUT_CHANGE_BOOKMARK: fix leak and return
Filip Roséen [Fri, 19 May 2017 07:30:36 +0000 (09:30 +0200)]
input/control: INPUT_CHANGE_BOOKMARK: fix leak and return

The previous implementation would potentially try to duplicate a
seekpoint that was never used due to invalid arguments, as well as
leaking said duplicate.

These changes make sure that we do not leak the resource, while also
preventing the unnecessary duplication + returning an error if
we are unable to complete the operation.

CID: 1409711

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
4 years agocopy: add SSE optimization to U&V planes interleaving
Victorien Le Couviour--Tuffet [Mon, 15 May 2017 14:22:34 +0000 (16:22 +0200)]
copy: add SSE optimization to U&V planes interleaving

used in I420 to NV12 conversion

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
4 years agocopy: add SSE optimization for NV12 to I420 conversion
Victorien Le Couviour--Tuffet [Fri, 12 May 2017 18:55:02 +0000 (20:55 +0200)]
copy: add SSE optimization for NV12 to I420 conversion

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
4 years agocopy: use an 8KB cache line instead of 4KB
Steve Lhomme [Wed, 10 May 2017 09:13:49 +0000 (11:13 +0200)]
copy: use an 8KB cache line instead of 4KB

Without this it's impossible to do some processing like splitting NV12 UV
planes, it requires double the resolution. In that case the code asserts on
assert(hstep > 0) in SSE_SplitPlanes().

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
4 years agocopy: rename CopyFrom{N,Y}v12 to more explicit names
Victorien Le Couviour--Tuffet [Mon, 15 May 2017 15:22:01 +0000 (17:22 +0200)]
copy: rename CopyFrom{N,Y}v12 to more explicit names

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
4 years agocopy: fix memory corruption in SSE Nv12 to Yv12 conversion
Thomas Guillem [Fri, 19 May 2017 07:22:52 +0000 (09:22 +0200)]
copy: fix memory corruption in SSE Nv12 to Yv12 conversion

This fixes a regression introduced by f9f0bbc1396af8816c3d6b6dfe222d911de61047

This memory corruption was not visible since this function is generally used
to copy from GPU mapped buffers, that are often bigger than what you ask.

4 years agogui/macosx: bookmarks: fix typo in terms of indices variable
Filip Roséen [Fri, 19 May 2017 02:52:04 +0000 (04:52 +0200)]
gui/macosx: bookmarks: fix typo in terms of indices variable

The variable for the current index is named "row", and not "i".

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agoinput/control: UpdateBookmarksOption: prevent exessive bookmark-options
Filip Roséen [Thu, 18 May 2017 12:17:54 +0000 (14:17 +0200)]
input/control: UpdateBookmarksOption: prevent exessive bookmark-options

If UpdateBookmarksOption is called more than once, where the generated
bookmark-variable string would be different, it will result in the
input_item_t having several entries for "bookmarks=".

This patch makes it so that we overwrite any existing entry if such is
available, instead of simply appending a new one.

fixes: #18338

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/adaptive: ChunksSourceStream: use mem-intializer-list in constructor
Filip Roséen [Thu, 18 May 2017 15:07:36 +0000 (17:07 +0200)]
demux/adaptive: ChunksSourceStream: use mem-intializer-list in constructor

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/adaptive: FakeEsOut: use mem-initializer-list in constructor
Filip Roséen [Thu, 18 May 2017 15:07:35 +0000 (17:07 +0200)]
demux/adaptive: FakeEsOut: use mem-initializer-list in constructor

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/adaptive: FakeESOutID: use mem-initializer-list in constructor
Filip Roséen [Thu, 18 May 2017 15:07:34 +0000 (17:07 +0200)]
demux/adaptive: FakeESOutID: use mem-initializer-list in constructor

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/adaptive: Downloader: prevent data-race on destruction
Filip Roséen [Thu, 18 May 2017 15:07:33 +0000 (17:07 +0200)]
demux/adaptive: Downloader: prevent data-race on destruction

Writing to killed needs to be protected by the mutex, there is also a
possibility of losing the sent signal unless we do it while the mutex
is acquired (a signal is not a semaphore).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/adaptive: Downloader::Run: simplify
Filip Roséen [Thu, 18 May 2017 15:07:32 +0000 (17:07 +0200)]
demux/adaptive: Downloader::Run: simplify

There is absolutely no need to lock and unlock the mutex on every
iteration, especially given that one cannot observe this behavior (as
there is nothing at all that guarantees that something can aquire the
lock inbetween those two calls).

There is also no need to check if we are killed twice, once is
sufficient

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/adaptive: NearOptimalAdaptionLogic: use mem-initalizer-list
Filip Roséen [Thu, 18 May 2017 15:07:31 +0000 (17:07 +0200)]
demux/adaptive: NearOptimalAdaptionLogic: use mem-initalizer-list

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agogui/macos: bookmarks: add support for fractional seconds
Filip Roséen [Thu, 18 May 2017 10:29:49 +0000 (12:29 +0200)]
gui/macos: bookmarks: add support for fractional seconds

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agogui/qt: menus: always enable bookmarks menu
Filip Roséen [Thu, 18 May 2017 10:29:48 +0000 (12:29 +0200)]
gui/qt: menus: always enable bookmarks menu

Due to the changes introduced by 36e12797b4a, the bookmark menu would
not be enabled if there were no choices currently associated with the
input. As a user should be able to manage the bookmarks, even if no
such is present at the current time, we forcefully add
VLC_VAR_HASCHOICE to the i_type.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agogui/qt: bookmarks: add support for fractional seconds
Filip Roséen [Thu, 18 May 2017 10:29:47 +0000 (12:29 +0200)]
gui/qt: bookmarks: add support for fractional seconds

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agogui/macosx: VLCRendererDialog: fix leak of vlc_rd_get_names result
Filip Roséen [Thu, 18 May 2017 10:19:38 +0000 (12:19 +0200)]
gui/macosx: VLCRendererDialog: fix leak of vlc_rd_get_names result

This is the same bug as was recently fixed by 1cf21dd, namely that the
individual resources within the two resulting arrays were not released
(causing a leak).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agotext/strings: vlc_xml_decode: use ARRAY_SIZE
Filip Roséen [Thu, 18 May 2017 10:19:30 +0000 (12:19 +0200)]
text/strings: vlc_xml_decode: use ARRAY_SIZE

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agotext_renderer/freetype: DumpDictionary: prevent potential null-dereference
Filip Roséen [Thu, 18 May 2017 10:19:27 +0000 (12:19 +0200)]
text_renderer/freetype: DumpDictionary: prevent potential null-dereference

vlc_dictionary_all_keys may return NULL on error, rendering the
previous implemention prone to a potential null-pointer dereference.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agostream_out/raop: WriteAuxHeaders: prevent potential null-dereference
Filip Roséen [Thu, 18 May 2017 10:19:26 +0000 (12:19 +0200)]
stream_out/raop: WriteAuxHeaders: prevent potential null-dereference

vlc_dictionary_all_keys returns NULL on error, meaning that the
previous implementation could result in a null-pointer dereference.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/mp4: SetupAudioES: add missing error-check
Filip Roséen [Thu, 18 May 2017 10:16:55 +0000 (12:16 +0200)]
demux/mp4: SetupAudioES: add missing error-check

The changes introduced in 08a2eb61 correctly adds a new block for
reading from p_extra, it however left out the if-condition to protect
said block.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agogui/qt: ActionsManager::isItemSout: prefer static_cast
Filip Roséen [Thu, 18 May 2017 10:02:19 +0000 (12:02 +0200)]
gui/qt: ActionsManager::isItemSout: prefer static_cast

There is no need to use reinterpret_cast when the source or
destination type is pointer-to-void, static_cast is more accurate (and
safer).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agogui/qt: VideoWidget::request: prefer static_cast
Filip Roséen [Thu, 18 May 2017 10:02:18 +0000 (12:02 +0200)]
gui/qt: VideoWidget::request: prefer static_cast

There is no need to use reinterpret_cast when the source or
destination type is pointer-to-void, static_cast is more accurate (and
safer).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agosout/chromecast: Open: prefer static_cast
Filip Roséen [Thu, 18 May 2017 10:02:17 +0000 (12:02 +0200)]
sout/chromecast: Open: prefer static_cast

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agosout/chromecast: intf_sys_t: prefer static_cast
Filip Roséen [Thu, 18 May 2017 10:02:16 +0000 (12:02 +0200)]
sout/chromecast: intf_sys_t: prefer static_cast

There is no need to use reinterpret_cast when the destination or
source type is pointer-to-void, static_cast is more accurate (and
safer).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/adaptive: Downloader: prefer static_cast
Filip Roséen [Thu, 18 May 2017 10:02:15 +0000 (12:02 +0200)]
demux/adaptive: Downloader: prefer static_cast

There is no need to use reinterpret_cast when the destination or
source type is pointer-to-void, static_cast is more accurate (and
safer).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agodemux/adaptive: PlaylistManager: prefer static_cast
Filip Roséen [Thu, 18 May 2017 10:02:14 +0000 (12:02 +0200)]
demux/adaptive: PlaylistManager: prefer static_cast

There is no need to use reinterpret_cast when the source or
destination type is pointer-to-void, static_cast is more accurate (and
safer).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agogui/qt: VideoWidget::nativeEvent: prefer static_cast
Filip Roséen [Thu, 18 May 2017 10:02:13 +0000 (12:02 +0200)]
gui/qt: VideoWidget::nativeEvent: prefer static_cast

Given that message is of type pointer-to-void, a static_cast is
enough.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agoinput: remove input_item_node_t.p_parent
Rémi Denis-Courmont [Thu, 18 May 2017 18:49:46 +0000 (21:49 +0300)]
input: remove input_item_node_t.p_parent

4 years agoinput: add explicit input_item_node_RemoveNode()
Rémi Denis-Courmont [Thu, 18 May 2017 18:46:31 +0000 (21:46 +0300)]
input: add explicit input_item_node_RemoveNode()

This is rarely used (only once in the whole code base).

4 years agoRemove (INSERT|REMOVE)_ELEM
Rémi Denis-Courmont [Thu, 18 May 2017 18:10:45 +0000 (21:10 +0300)]
Remove (INSERT|REMOVE)_ELEM

4 years agoUse TAB_ERASE instead of REMOVE_ELEM
Rémi Denis-Courmont [Thu, 18 May 2017 18:09:20 +0000 (21:09 +0300)]
Use TAB_ERASE instead of REMOVE_ELEM

4 years agoUse TAB_REMOVE instead of REMOVE_ELEM where applicable
Rémi Denis-Courmont [Thu, 18 May 2017 18:08:46 +0000 (21:08 +0300)]
Use TAB_REMOVE instead of REMOVE_ELEM where applicable

4 years agostats: use TAB_CLEAN, simplify
Rémi Denis-Courmont [Thu, 18 May 2017 18:09:34 +0000 (21:09 +0300)]
stats: use TAB_CLEAN, simplify

4 years agoUse TAB_INSERT instead of INSERT_ELEM
Rémi Denis-Courmont [Thu, 18 May 2017 17:54:10 +0000 (20:54 +0300)]
Use TAB_INSERT instead of INSERT_ELEM

4 years agoUse TAB_APPEND instead of INSERT_ELEM where applicable
Rémi Denis-Courmont [Thu, 18 May 2017 17:47:15 +0000 (20:47 +0300)]
Use TAB_APPEND instead of INSERT_ELEM where applicable

4 years agoplaylist/item: input_item_add_subitem_tree: do not try to lock already locked playlist
Filip Roséen [Thu, 18 May 2017 18:14:25 +0000 (20:14 +0200)]
playlist/item: input_item_add_subitem_tree: do not try to lock already locked playlist

This is a fixup of 6f63de1, which accidentally resulted in the
implementation trying to acquire an already acquired mutex.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agovlc_codec: decoder_QueueCc: fix documentation
Filip Roséen [Thu, 18 May 2017 10:50:30 +0000 (12:50 +0200)]
vlc_codec: decoder_QueueCc: fix documentation

These changes include removal of a duplicate usage of "queues", as
well as extending the documentation to include description of all
arguments.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agovlc_arrays: rename reserved identifier
Filip Roséen [Thu, 18 May 2017 10:59:19 +0000 (12:59 +0200)]
vlc_arrays: rename reserved identifier

double underscore is reserved to the implementation according to both
the C and C++ ISO standards; as such we should not use such naming.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput/input: fix leak of seekpoints related to bookmarks
Filip Roséen [Thu, 18 May 2017 12:46:07 +0000 (14:46 +0200)]
input/input: fix leak of seekpoints related to bookmarks

As clean-up of these resources were missing, we would leak memory each
time we had an input with bookmarks attached.

fixes: #18339

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/mpeg: decrease diagnostic verbosity
Filip Roséen [Thu, 18 May 2017 10:59:17 +0000 (12:59 +0200)]
demux/mpeg: decrease diagnostic verbosity

The relevant functions are only called during module probing, as such
the diagnostics are not worthy of being an "error" if invocation of
vlc_stream_Peek fails.

These changes simply decreases the verbosity of the diagnostics from
error to debug.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoconfig/chain: config_StringEscape: replace usage of xmalloc
Filip Roséen [Thu, 18 May 2017 10:59:18 +0000 (12:59 +0200)]
config/chain: config_StringEscape: replace usage of xmalloc

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agocodec/jpeg: jpeg_GetProjection: prevent out-of-bound read
Filip Roséen [Thu, 18 May 2017 14:46:05 +0000 (16:46 +0200)]
codec/jpeg: jpeg_GetProjection: prevent out-of-bound read

We must take ill-formed XMP data into account, as a missing
null-termination of the XMP data leads to a heap-buffer-overflow (as
later parts of the implementation assumes that the data is
null-terminated (as it should be)).

fixes: #18340

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agocodec/cc: cc_Init: clean-up
Filip Roséen [Thu, 18 May 2017 10:47:55 +0000 (12:47 +0200)]
codec/cc: cc_Init: clean-up

Narrow scope of the iteration variable, while also removing trailing
whitespace from within the loop-body.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput: bookmarks: support fractional seconds
Filip Roséen [Thu, 18 May 2017 10:29:46 +0000 (12:29 +0200)]
input: bookmarks: support fractional seconds

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput/control: input_vaControl: clean-up
Filip Roséen [Thu, 18 May 2017 10:29:45 +0000 (12:29 +0200)]
input/control: input_vaControl: clean-up

 - remove redundant casts
 - remove unnecessary whitespace
 - fix indentation
 - merge declaration + initialization

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput/control: INPUT_CLEAR_BOOKMARKS: refactor
Filip Roséen [Thu, 18 May 2017 10:29:44 +0000 (12:29 +0200)]
input/control: INPUT_CLEAR_BOOKMARKS: refactor

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput/control: INPUT_{ADD, CHANGE}_BOOKMARK: do not add incomplete bookmark
Filip Roséen [Thu, 18 May 2017 10:29:43 +0000 (12:29 +0200)]
input/control: INPUT_{ADD, CHANGE}_BOOKMARK: do not add incomplete bookmark

A bookmark needs to have a name which is non-null to prevent potential
null-dereferences further down the road, priv->pp_bookmark shall also
not contain any null-pointers.

These changes make sure that the above invariant holds during
modification.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput/control: UpdateBookmarksOption: refactor
Filip Roséen [Thu, 18 May 2017 10:29:42 +0000 (12:29 +0200)]
input/control: UpdateBookmarksOption: refactor

The implementation is much easier to reason about if vlc_memstream is
used instead of the previously used mechanism for the option-string
generation.

These changes also removes two named variables that are only used as
arguments to var_Change.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agovlc_stream_extractor: vlc_stream_NewMRL: fixup of documentation
Filip Roséen [Thu, 18 May 2017 10:19:40 +0000 (12:19 +0200)]
vlc_stream_extractor: vlc_stream_NewMRL: fixup of documentation

This rephrasing should make the associated documentation a little
easier to comprehend.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agovlc_fingerprinter: use size_t for index argument in callback
Filip Roséen [Thu, 18 May 2017 10:19:39 +0000 (12:19 +0200)]
vlc_fingerprinter: use size_t for index argument in callback

It does not make sense for the passed index to be negative, nor is the
current diagnostic related to comparision of different signedness very
nice to look at.

This fixes both issues by changing the argument to size_t, making sure
that the values passed are suitable for interaction with
vlc_array-related functions.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agovideo_output/video_output: ThreadChangeFilters: use likely
Filip Roséen [Thu, 18 May 2017 10:19:36 +0000 (12:19 +0200)]
video_output/video_output: ThreadChangeFilters: use likely

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agostream_out/duplicate: Close: narrow scope of iteration variable
Filip Roséen [Thu, 18 May 2017 10:19:28 +0000 (12:19 +0200)]
stream_out/duplicate: Close: narrow scope of iteration variable

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agolua/vlc: vlc_sd_probe_Open: use vlc_dictionary_has_key
Filip Roséen [Thu, 18 May 2017 10:19:31 +0000 (12:19 +0200)]
lua/vlc: vlc_sd_probe_Open: use vlc_dictionary_has_key

As we are only checking whether the dictionary has a certain key (to
prevent loading the same thing twice), vlc_dictionary_has_key is
semantically more correct than vlc_dictionary_value_for_key.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput/stream_extractor: se_DirControl: silence unused argument diagnostic
Filip Roséen [Thu, 18 May 2017 10:19:42 +0000 (12:19 +0200)]
input/stream_extractor: se_DirControl: silence unused argument diagnostic

Following the changes introduced by c0d5d15 and 6657a82, the argument
named "args" is unused in the relevant function. These changes silence
the related diagnostic.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput/item: input_item_AddOption: do not add NULL on error
Filip Roséen [Thu, 18 May 2017 10:19:29 +0000 (12:19 +0200)]
input/item: input_item_AddOption: do not add NULL on error

Implementations querying p_input->ppsz_options rely on each entry not
being NULL, meaning that we shall not add such values to the array.

These changes make sure that we check whether the strdup was
successful, and return an error if it was not.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agoinput/input: InputStreamHandleAnchor: include missing information in diagnostics
Filip Roséen [Thu, 18 May 2017 10:19:41 +0000 (12:19 +0200)]
input/input: InputStreamHandleAnchor: include missing information in diagnostics

The previous diagnostics were not at all helpful as they did not
include for what things happened. This fixes the issue by including
the path of the relevant stream.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/mkv: matroska_segment_C::ParseTrackEntry: prevent potential null-dereference
Filip Roséen [Thu, 18 May 2017 10:19:33 +0000 (12:19 +0200)]
demux/mkv: matroska_segment_C::ParseTrackEntry: prevent potential null-dereference

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agocodec/ttml: substtml: s, DictionnaryMerge, DictionaryMerge,
Filip Roséen [Thu, 18 May 2017 10:19:32 +0000 (12:19 +0200)]
codec/ttml: substtml: s, DictionnaryMerge, DictionaryMerge,

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agocodec/hxxx_helper: removing redundant new-line from call to msg_Dbg
Filip Roséen [Thu, 18 May 2017 10:19:34 +0000 (12:19 +0200)]
codec/hxxx_helper: removing redundant new-line from call to msg_Dbg

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf: remove redundant comments
Filip Roséen [Thu, 18 May 2017 10:08:27 +0000 (12:08 +0200)]
demux/playlist: xspf: remove redundant comments

These comments does nothing to improve the comprehension of the
implementation as it is rather obvious what the lines that follow does
given the context in which they are in.

If someone has trouble understanding the semantics related to
XML_READER-enumerators, that is to be documented by the xml-reader
(not something that uses them).

These changes also removes misleading legacy comments that are no
longer matching the implementation itself (such as stating that we
only care about TrackList elements when parsing a playlist node (which
is not accurate).

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf: parse_extension_node: refactor error-handling
Filip Roséen [Thu, 18 May 2017 10:08:26 +0000 (12:08 +0200)]
demux/playlist: xspf: parse_extension_node: refactor error-handling

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf/parse_track_node: fix leak on subnode failure
Filip Roséen [Thu, 18 May 2017 10:08:25 +0000 (12:08 +0200)]
demux/playlist: xspf/parse_track_node: fix leak on subnode failure

fixes: #18337

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf: remove redundant variable
Filip Roséen [Thu, 18 May 2017 10:08:24 +0000 (12:08 +0200)]
demux/playlist: xspf: remove redundant variable

b_release_input_item was used to denote whether or not the object
referred to by p_new_input should be released or not, but the object
is unconditionally released if "p_new_input" is not NULL; as such
b_release_input_item has been removed.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf: remove unnecessary FREENULL
Filip Roséen [Thu, 18 May 2017 10:08:23 +0000 (12:08 +0200)]
demux/playlist: xspf: remove unnecessary FREENULL

As psz_value is already guaranteed to be NULL at the place of
expansion, the usage of FREENULL is redundant.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf: only use text-elements inside current tag
Filip Roséen [Thu, 18 May 2017 10:08:22 +0000 (12:08 +0200)]
demux/playlist: xspf: only use text-elements inside current tag

These changes adds logic to not use an out-of-text text-element when
parsing an upcoming tag, as the text-element certainly is not part of
a tag that has not yet been parsed.

More accurately, a text-node that exists prior to an element that
has no text-body would previously inaccurately be treated as if it was
inside said element.

fixes: #18336

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf: fix skip of unknown <extension>
Filip Roséen [Thu, 18 May 2017 10:08:21 +0000 (12:08 +0200)]
demux/playlist: xspf: fix skip of unknown <extension>

As a XML_READER_STARTELEM does not have a corresponding
XML_READER_ENDELEM if the tag is self-closing, the code responsible
for skipping unknown extension-tags would result in skips outside of
the target element.

These changes fixes the issue by making sure that we do not increase
the ignore-scope for self-closing elements.

fixes: #18335

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf: replace FREE_VALUE with FREENULL
Filip Roséen [Thu, 18 May 2017 10:02:37 +0000 (12:02 +0200)]
demux/playlist: xspf: replace FREE_VALUE with FREENULL

The same functionality is already exposed through FREENULL.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agodemux/playlist: xspf: use ARRAY_SIZE
Filip Roséen [Thu, 18 May 2017 10:02:36 +0000 (12:02 +0200)]
demux/playlist: xspf: use ARRAY_SIZE

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agolib/media_discoverer: libvlc_media_discoverer_release: simplify
Filip Roséen [Thu, 18 May 2017 10:16:56 +0000 (12:16 +0200)]
lib/media_discoverer: libvlc_media_discoverer_release: simplify

Instead of getting all the dictionary keys, and iterating over them to
get the associated values, only to free/release the associated data;
use vlc_dictionary_clear together with a callback to handle the work
for us.

These changes also fixes a potential null-pointer dereference if the
previous usage of vlc_dictionary_all_keys failed.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agocontrol/dbus: dbus_tracklist: simplify PropertiesChangedSignal
Filip Roséen [Thu, 18 May 2017 10:02:08 +0000 (12:02 +0200)]
control/dbus: dbus_tracklist: simplify PropertiesChangedSignal

There is no need to query all keys when we are only interested in the
presence of a single one; these changes simplify the implementation to
properly reflect the intent.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agocontrol/dbus: dbus_root: simplify PropertiesChangedSignal
Filip Roséen [Thu, 18 May 2017 10:02:07 +0000 (12:02 +0200)]
control/dbus: dbus_root: simplify PropertiesChangedSignal

There is no need to query all keys when we are only interested in the
presence of a single one; these changes simplify the implementation to
properly reflect the intent.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agocontrol/dbus: dbus_player: clean PropertiesChangedSignal
Filip Roséen [Thu, 18 May 2017 10:02:06 +0000 (12:02 +0200)]
control/dbus: dbus_player: clean PropertiesChangedSignal

The return-value of vlc_dictionary_all_keys is a null-terminated array
of the associated keys (on success), meaning that there is no explicit
need to query the count of keys.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agokeystore/kwallet: free error if set
Filip Roséen [Thu, 18 May 2017 10:01:57 +0000 (12:01 +0200)]
keystore/kwallet: free error if set

If an error occurs leading up to the affected paths, the error-message
has to be freed in order to not leak allocated resources.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agokeystore/kwallet: values2key: simplify if-condition
Filip Roséen [Thu, 18 May 2017 10:01:56 +0000 (12:01 +0200)]
keystore/kwallet: values2key: simplify if-condition

There is no need to check for the inverse of a condition that was just
being checked.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
4 years agokeystore/kwallet: shorten error-checks when appending to message
Filip Roséen [Thu, 18 May 2017 10:01:55 +0000 (12:01 +0200)]
keystore/kwallet: shorten error-checks when appending to message

As we do not care which of the calls to dbus_message_iter_append_basic
fails, there is no need for an explicit if for every function
invocation; instead we can rely on the fact that if-conditions
short-circuit.

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