vlc.git
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 years agoBump plugin ABI
Rémi Denis-Courmont [Sun, 21 May 2017 18:36:34 +0000 (21:36 +0300)]
Bump plugin ABI

5 years agovlc_es: use union in es_format_t
Rémi Denis-Courmont [Sun, 21 May 2017 18:17:12 +0000 (21:17 +0300)]
vlc_es: use union in es_format_t

This saves about 200 bytes per instance.

5 years agostream_out: rtp: add support for HEVC
Francois Cartegnie [Sun, 21 May 2017 12:17:43 +0000 (14:17 +0200)]
stream_out: rtp: add support for HEVC

5 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

5 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

5 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

5 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

5 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

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

5 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

5 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

5 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

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

5 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

5 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

5 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

5 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

5 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

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

5 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

5 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

5 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>
5 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

5 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>
5 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>
5 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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.

5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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

5 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).

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

5 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

5 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

5 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

5 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

5 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>