vlc.git
3 years agodirect3d11: fix crash when resource allocation fails
Steve Lhomme [Wed, 1 Aug 2018 12:09:12 +0000 (14:09 +0200)]
direct3d11: fix crash when resource allocation fails

We release the staging picture twice which is not supported.

3 years agovout: win32: direct3d11: fixup of d1e7dc1
Filip Roséen [Tue, 31 Jul 2018 09:58:29 +0000 (11:58 +0200)]
vout: win32: direct3d11: fixup of d1e7dc1

As d1e7dc1 explicitly adds copying of the relevant fmt after the
function is called, the function itself should not be part of such
copying (to make matters worse, shallow copy is unsafe as the struct
may contain pointers to dynamically allocated resources).

fixes: #20487

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
3 years agoRevert "direct3d11: only set the vd->fmt once"
Steve Lhomme [Wed, 1 Aug 2018 13:09:16 +0000 (15:09 +0200)]
Revert "direct3d11: only set the vd->fmt once"

This reverts commit 5801f7cda364930c27886ab3b50505389fed9ec5.

3 years agodirect3d11: use the indirect texture size
Steve Lhomme [Wed, 1 Aug 2018 13:08:22 +0000 (15:08 +0200)]
direct3d11: use the indirect texture size

It can have padding for the decoder that is not known to avcodec and we don't
want to show it in vd->fmt to avoid adding a converter.

This padding needs to be taken in account when placing the picture in the display area.

We can get rid of the hackish BEFORE_UPDATE_RECTS/AFTER_UPDATE_RECTS macros.

3 years agovout:win32: read the picture pool size indirectly
Steve Lhomme [Wed, 1 Aug 2018 13:03:23 +0000 (15:03 +0200)]
vout:win32: read the picture pool size indirectly

This allows overriding if the internal size is not set in vd->fmt (to avoid
a converter being added if some padding is added internally).

3 years agomedia library: Fix invalid query handling
Hugo Beauzée-Luyssen [Wed, 1 Aug 2018 09:43:32 +0000 (11:43 +0200)]
media library: Fix invalid query handling

3 years agodirect3d11: only set the vd->fmt once
Steve Lhomme [Wed, 1 Aug 2018 11:03:18 +0000 (13:03 +0200)]
direct3d11: only set the vd->fmt once

And use video_format_Copy() since it may contain the palette of vd->source.

It also needs a video_format_Clean() before because it was originally set
using video_format_Copy() of vd->source in the core in VoutValidateFormat().

Fixes #20487

3 years agocodec:jpeg: PNG are always decoded to full range
Steve Lhomme [Wed, 1 Aug 2018 09:43:11 +0000 (11:43 +0200)]
codec:jpeg: PNG are always decoded to full range

Ref #19127

3 years agocodec:png: PNG are always decoded to full range
Steve Lhomme [Wed, 1 Aug 2018 09:36:47 +0000 (11:36 +0200)]
codec:png: PNG are always decoded to full range

Ref #19127

3 years agodirect3d11: remove parameter names in prototypes
Steve Lhomme [Wed, 1 Aug 2018 08:28:07 +0000 (10:28 +0200)]
direct3d11: remove parameter names in prototypes

3 years agodisplay: internal filters are converters
Steve Lhomme [Wed, 1 Aug 2018 08:25:34 +0000 (10:25 +0200)]
display: internal filters are converters

They're not all kinds of random filters and are used only to adapt the decoder
output to the format the vout wants.

If the filter chain is NULL that means nothing can be displayed. It would be
good to try another vout in that case.

3 years agocanvas: fix typo
Steve Lhomme [Wed, 1 Aug 2018 07:54:00 +0000 (09:54 +0200)]
canvas: fix typo

3 years agotest: fix distcheck with dash uri test
Francois Cartegnie [Wed, 1 Aug 2018 07:51:34 +0000 (09:51 +0200)]
test: fix distcheck with dash uri test

3 years agodirect3d9: make the OS detection not dependent on the app manifest
Steve Lhomme [Wed, 1 Aug 2018 05:56:11 +0000 (07:56 +0200)]
direct3d9: make the OS detection not dependent on the app manifest

3 years agodirect3d11: make the OS detection not dependent on the app manifest
Steve Lhomme [Wed, 1 Aug 2018 05:49:33 +0000 (07:49 +0200)]
direct3d11: make the OS detection not dependent on the app manifest

hopefully the location won't change in future Windows versions

3 years agogui: minimal_macosx: init window on main thread
Marvin Scholz [Tue, 31 Jul 2018 23:11:35 +0000 (01:11 +0200)]
gui: minimal_macosx: init window on main thread

The window, being UI, has to be created on the main thread.

3 years agodemux: dash: use uri token replacement helper
Francois Cartegnie [Tue, 31 Jul 2018 07:32:03 +0000 (09:32 +0200)]
demux: dash: use uri token replacement helper

fixes escaping and missing format strings

3 years agotests: check dash uri token replacements
Francois Cartegnie [Tue, 31 Jul 2018 16:14:00 +0000 (18:14 +0200)]
tests: check dash uri token replacements

3 years agodemux: dash: add Token replacement helper
Francois Cartegnie [Tue, 31 Jul 2018 10:42:06 +0000 (12:42 +0200)]
demux: dash: add Token replacement helper

3 years agod3d11va: don't use D3D11VA automatically on OSes older than Win8.1
Steve Lhomme [Tue, 31 Jul 2018 13:37:34 +0000 (15:37 +0200)]
d3d11va: don't use D3D11VA automatically on OSes older than Win8.1

3 years agodirect3d11: don't use D3D11 automatically on OSes older than Win8.1
Steve Lhomme [Tue, 31 Jul 2018 13:18:16 +0000 (15:18 +0200)]
direct3d11: don't use D3D11 automatically on OSes older than Win8.1

3 years agodirect3d9: use a version check with a better name to disable D3D9
Steve Lhomme [Tue, 31 Jul 2018 13:15:48 +0000 (15:15 +0200)]
direct3d9: use a version check with a better name to disable D3D9

The VersionHelpers API is available since Win2000

3 years agocontribs: Bump medialibrary hash
Hugo Beauzée-Luyssen [Tue, 31 Jul 2018 12:49:17 +0000 (14:49 +0200)]
contribs: Bump medialibrary hash

This fixes building on macOS with meson, and a few other misc bugs

3 years agosd: upnp: parseSatipServer: add missing error check
Filip Roséen [Mon, 30 Jul 2018 05:25:14 +0000 (07:25 +0200)]
sd: upnp: parseSatipServer: add missing error check

Prevents a potential null-dereference on the line that follows.

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
3 years agosd: upnp: parseSatipServer: prevent leak
Filip Roséen [Tue, 31 Jul 2018 12:44:05 +0000 (14:44 +0200)]
sd: upnp: parseSatipServer: prevent leak

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
3 years agoservices_discovery: upnp: Fix libupnp header includes
Marvin Scholz [Sat, 28 Jul 2018 15:54:25 +0000 (17:54 +0200)]
services_discovery: upnp: Fix libupnp header includes

The libupnp .pc file uses -I${includedir}/upnp which means that the
way the headers were included would not result in them actually being
found in all cases due to the extraneous "upnp".

3 years agoupnp: Fix leak
Hugo Beauzée-Luyssen [Tue, 31 Jul 2018 12:30:33 +0000 (14:30 +0200)]
upnp: Fix leak

CID #1438148

3 years agoupnp: Fix wrong comparison of psz_satip_channellist
Marvin Scholz [Tue, 31 Jul 2018 12:31:48 +0000 (14:31 +0200)]
upnp: Fix wrong comparison of psz_satip_channellist

3 years agoscaletempo: Fix leak on error
Hugo Beauzée-Luyssen [Tue, 31 Jul 2018 12:11:58 +0000 (14:11 +0200)]
scaletempo: Fix leak on error

3 years agosoxr: Fix variable shadowing
Hugo Beauzée-Luyssen [Tue, 31 Jul 2018 12:10:32 +0000 (14:10 +0200)]
soxr: Fix variable shadowing

3 years agosoxr: Fix leak on error
Hugo Beauzée-Luyssen [Tue, 31 Jul 2018 12:09:41 +0000 (14:09 +0200)]
soxr: Fix leak on error

3 years agotrivial mixer: Don't leak all input blocks
Hugo Beauzée-Luyssen [Tue, 31 Jul 2018 12:04:28 +0000 (14:04 +0200)]
trivial mixer: Don't leak all input blocks

3 years agodemux: dash: replace duplicate tokens
Francois Cartegnie [Tue, 31 Jul 2018 07:01:21 +0000 (09:01 +0200)]
demux: dash: replace duplicate tokens

refs #20868

3 years agocontrib: dos2unix of diffpatch.sh
Zhao Zhili [Tue, 31 Jul 2018 06:56:08 +0000 (14:56 +0800)]
contrib: dos2unix of diffpatch.sh

3 years agodirectx_va: DXVA2_ModeMPEG2_VLD also supports the main profile
Steve Lhomme [Tue, 31 Jul 2018 06:15:25 +0000 (08:15 +0200)]
directx_va: DXVA2_ModeMPEG2_VLD also supports the main profile

Ref #20343

3 years agocodec:jpeg: set the decoder output to sRGB
Steve Lhomme [Mon, 30 Jul 2018 13:35:10 +0000 (15:35 +0200)]
codec:jpeg: set the decoder output to sRGB

That's how the decoder is configured in line 522

Ref #19127

3 years agocodec:png: set the default transfer function to sRGB
Steve Lhomme [Mon, 30 Jul 2018 13:12:43 +0000 (15:12 +0200)]
codec:png: set the default transfer function to sRGB

See line 266

Ref #19127

3 years agosout:record: fix invalid dts test
Steve Lhomme [Mon, 30 Jul 2018 05:31:07 +0000 (07:31 +0200)]
sout:record: fix invalid dts test

3 years agoavcodec:video: log the reason why the format change won't reuse the decoder
Steve Lhomme [Mon, 30 Jul 2018 11:59:36 +0000 (13:59 +0200)]
avcodec:video: log the reason why the format change won't reuse the decoder

Ref: #20343

3 years agodxva: blacklist core 2 duo related chipsets that can't even decoder 720p properly
Steve Lhomme [Mon, 30 Jul 2018 08:35:54 +0000 (10:35 +0200)]
dxva: blacklist core 2 duo related chipsets that can't even decoder 720p properly

3 years agodemux: adaptive: extend single chunk to 32M
Francois Cartegnie [Fri, 27 Jul 2018 14:10:31 +0000 (16:10 +0200)]
demux: adaptive: extend single chunk to 32M

3 years agodemux: adaptive: force access for manifests & keys
Francois Cartegnie [Mon, 30 Jul 2018 08:03:55 +0000 (10:03 +0200)]
demux: adaptive: force access for manifests & keys

ok because, single file, no range, no pipelining.
workarounds missing compression w/ huge yt manifests

3 years agodemux: adaptive: allow to force access for some segments
Francois Cartegnie [Fri, 27 Jul 2018 10:45:31 +0000 (12:45 +0200)]
demux: adaptive: allow to force access for some segments

3 years agodemux: adaptive: add abstractconnectionfactory
Francois Cartegnie [Fri, 27 Jul 2018 16:33:01 +0000 (18:33 +0200)]
demux: adaptive: add abstractconnectionfactory

3 years agoinput:item: return 0 when the duration is unset
Steve Lhomme [Fri, 27 Jul 2018 10:21:40 +0000 (12:21 +0200)]
input:item: return 0 when the duration is unset

The return value is not checked anywhere and the function is not documented.

In case the value of VLC_TICK_INVALID changes we should not return a bad value.

--
or we need to document the function and check the return value everywhere

3 years agoinput:item: return 0 when the duration is indefinite, rather than -1
Steve Lhomme [Tue, 24 Jul 2018 13:36:46 +0000 (15:36 +0200)]
input:item: return 0 when the duration is indefinite, rather than -1

The return value is not checked anywhere and the function is not documented.

3 years agom3u: reset the duration between items to indefinite
Steve Lhomme [Tue, 24 Jul 2018 13:05:54 +0000 (15:05 +0200)]
m3u: reset the duration between items to indefinite

This is how it's initialized before the loop, this assumes items in a m3u with no
duration are live streams.

3 years agoinput:item: the duration for card items is indefinite
Steve Lhomme [Thu, 26 Jul 2018 04:42:42 +0000 (06:42 +0200)]
input:item: the duration for card items is indefinite

(aka not finite)

3 years agovlc_input_item: remove INPUT_DURATION_ZERO
Steve Lhomme [Thu, 26 Jul 2018 07:47:27 +0000 (09:47 +0200)]
vlc_input_item: remove INPUT_DURATION_ZERO

If a duration is explicitly 0 (an item that won't play any content) then it can
be set to 0 directly.

3 years agomodules: set 0 for items which value is actually 0
Steve Lhomme [Thu, 26 Jul 2018 07:46:16 +0000 (09:46 +0200)]
modules: set 0 for items which value is actually 0

And it should not be set explicitly to INPUT_DURATION_NONE which is for nodes
and directories.

3 years agoasx: the default duration of items is unset unless read properly
Steve Lhomme [Fri, 27 Jul 2018 10:36:00 +0000 (12:36 +0200)]
asx: the default duration of items is unset unless read properly

3 years agopodcast: set the podcat duration to unset when it cannot be parsed
Steve Lhomme [Thu, 26 Jul 2018 07:31:39 +0000 (09:31 +0200)]
podcast: set the podcat duration to unset when it cannot be parsed

Rather than assuming it's a livestream which is unlikely for a podcast.
The real duration of the item will be filled by the preparser or on playback.

It's also the value used in input_item_New() when initializing the input item
being read.

3 years agovlc_input_item: rename INPUT_DURATION_UNKNOWN to INPUT_DURATION_INDEFINITE
Steve Lhomme [Fri, 27 Jul 2018 08:22:02 +0000 (10:22 +0200)]
vlc_input_item: rename INPUT_DURATION_UNKNOWN to INPUT_DURATION_INDEFINITE

For sources with no exact time limits, therefore it should not be used as such.

3 years agovlc_input_item: rename INPUT_DURATION_INVALID to INPUT_DURATION_UNSET
Steve Lhomme [Thu, 26 Jul 2018 06:16:42 +0000 (08:16 +0200)]
vlc_input_item: rename INPUT_DURATION_INVALID to INPUT_DURATION_UNSET

A duration cannot be invalid and the define is used for items where a duration
should not be set like nodes and directories.

It's also used by input_item_New() on items that don't have the duration when
the source is parsed by may get it when parsed in the input thread.

3 years agoUpnp/satip: default to auto and rename options
Jean-Baptiste Kempf [Sun, 29 Jul 2018 16:50:24 +0000 (18:50 +0200)]
Upnp/satip: default to auto and rename options

3 years agoUPnP: split sat>ip parsing function
Jean-Baptiste Kempf [Sun, 29 Jul 2018 16:28:48 +0000 (18:28 +0200)]
UPnP: split sat>ip parsing function

And add an Auto mode, that works as one would expect

Close #19751

3 years agotls: use const struct for callbacks
Rémi Denis-Courmont [Sun, 29 Jul 2018 09:00:59 +0000 (12:00 +0300)]
tls: use const struct for callbacks

3 years agomux: mp4: skip elst for empty tracks
Francois Cartegnie [Fri, 27 Jul 2018 13:49:10 +0000 (15:49 +0200)]
mux: mp4: skip elst for empty tracks

3 years agomux: mp4: ensure non negative elst times
Francois Cartegnie [Fri, 27 Jul 2018 13:45:58 +0000 (15:45 +0200)]
mux: mp4: ensure non negative elst times

because shit can happen with dts less streams

3 years agosout: record: workaround missing dts
Francois Cartegnie [Fri, 27 Jul 2018 13:31:42 +0000 (15:31 +0200)]
sout: record: workaround missing dts

3 years agod3d11_filters: fix the second processor texture not setting up a ProcessorInputView
Steve Lhomme [Fri, 27 Jul 2018 11:05:57 +0000 (13:05 +0200)]
d3d11_filters: fix the second processor texture not setting up a ProcessorInputView

And the first one being used twice.

Also make sure we don't try to release NULL input even though it should
not ever be possible.

3 years agodemux: mkv: revert ab042aa7a8befcf9fe80b5f46fb5320bfe7a0230
Filip Roséen [Tue, 17 Jul 2018 04:57:45 +0000 (06:57 +0200)]
demux: mkv: revert ab042aa7a8befcf9fe80b5f46fb5320bfe7a0230

The changes introduced by the commit in question are redundant; if
demuxer_sys_t::b_seekable is false we never execute the added lines.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
3 years agodemux: mkv: !b_seekable implies b_fastseekable = false
Filip Roséen [Tue, 17 Jul 2018 04:37:25 +0000 (06:37 +0200)]
demux: mkv: !b_seekable implies b_fastseekable = false

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
3 years agodemux: mkv: fix invalid format-specifier
Filip Roséen [Tue, 17 Jul 2018 02:05:26 +0000 (04:05 +0200)]
demux: mkv: fix invalid format-specifier

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
3 years agomime: add mp4
Steve Lhomme [Fri, 27 Jul 2018 05:29:54 +0000 (07:29 +0200)]
mime: add mp4

3 years agogui: macosx: simplify saving of playlist
Filip Roséen [Thu, 26 Jul 2018 09:42:38 +0000 (11:42 +0200)]
gui: macosx: simplify saving of playlist

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 years agocodec: cc: add debugging
Francois Cartegnie [Thu, 26 Jul 2018 09:19:44 +0000 (11:19 +0200)]
codec: cc: add debugging

in the same way as 708

3 years agocc: Only reset line position if rollup mode changed
Devin Heitmueller [Fri, 20 Jul 2018 18:40:29 +0000 (14:40 -0400)]
cc: Only reset line position if rollup mode changed

The EIA-608 parser was always resetting the line position whenever
it received a rollup code.  However this would cause the text to
be rendered improperly if the rollup code was received in the
middle of an existing line and the mode was unchanged.

Only reset the line position if the rollup mode changes from the
existing value.

This problem was exhibited in streams from the "Steve Harvey show"
where whatever EIA-608 encoder they are using would sometimes send
rollup codes mid-row (causing the leading characters on that line to
be overwritten by whatever characters followed the rollup code).

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Francois Cartegnie <fcvlcdev@free.fr>
3 years agovlc_input_item: add documentation on what the duration values stand for
Steve Lhomme [Tue, 24 Jul 2018 13:29:54 +0000 (15:29 +0200)]
vlc_input_item: add documentation on what the duration values stand for

3 years agoinput:item: use a define for vlc://nop
Steve Lhomme [Thu, 26 Jul 2018 05:22:58 +0000 (07:22 +0200)]
input:item: use a define for vlc://nop

So we can document what it means

3 years agoinput:item: store the item type with the enum
Steve Lhomme [Thu, 26 Jul 2018 06:33:14 +0000 (08:33 +0200)]
input:item: store the item type with the enum

3 years agoinput:item: use the enum type for the guessed input type
Steve Lhomme [Thu, 26 Jul 2018 06:23:29 +0000 (08:23 +0200)]
input:item: use the enum type for the guessed input type

3 years agoasx: reset the item duration for each loop iteration
Steve Lhomme [Tue, 24 Jul 2018 13:40:04 +0000 (15:40 +0200)]
asx: reset the item duration for each loop iteration

3 years agodec: spu: early release the previous vout when disabled
Thomas Guillem [Thu, 26 Jul 2018 06:51:54 +0000 (08:51 +0200)]
dec: spu: early release the previous vout when disabled

And don't wait to destroy the spu decoder to release the vout.

3 years agosout: transcode: designated init in decoder_owner_callbacks
Filip Roséen [Thu, 26 Jul 2018 00:42:40 +0000 (02:42 +0200)]
sout: transcode: designated init in decoder_owner_callbacks

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agosout: mosaic_bridge: designated init for decoder_owner_callbacks
Filip Roséen [Thu, 26 Jul 2018 00:42:39 +0000 (02:42 +0200)]
sout: mosaic_bridge: designated init for decoder_owner_callbacks

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agomisc: image: designated init for decoder_owner_callbacks
Filip Roséen [Thu, 26 Jul 2018 00:42:38 +0000 (02:42 +0200)]
misc: image: designated init for decoder_owner_callbacks

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agoinput: decoder: designated init for decoder_owner_callbacks
Filip Roséen [Thu, 26 Jul 2018 00:42:37 +0000 (02:42 +0200)]
input: decoder: designated init for decoder_owner_callbacks

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agostream_extractor: archive: enable Control/Seek even if libarchive died
Filip Roséen [Wed, 25 Jul 2018 19:49:14 +0000 (21:49 +0200)]
stream_extractor: archive: enable Control/Seek even if libarchive died

As we might be able to recover from a libarchive fatal error (by
resetting the handle to an appropriate state), there is no need for us
to disable controls completely.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 years agostream_extractor: archive: simplify seeking
Filip Roséen [Wed, 25 Jul 2018 02:33:24 +0000 (04:33 +0200)]
stream_extractor: archive: simplify seeking

As a seek should be successful even if the requested position is
outside the bounds of the input, there is no need for us to reset the
state of the libarchive reader immediately after seeking fails,
instead we rely on the fact that future reads will return EOF, and
that the reader will have to seek to a proper position in order to
continue reading (causing a libarchive reset).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 years agostream_extractor: archive: kill archive on reset error
Filip Roséen [Wed, 25 Jul 2018 03:34:44 +0000 (05:34 +0200)]
stream_extractor: archive: kill archive on reset error

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 years agostream_extractor: archive: explicitly handle EOF
Filip Roséen [Wed, 25 Jul 2018 03:04:06 +0000 (05:04 +0200)]
stream_extractor: archive: explicitly handle EOF

Things will be a lot simpler if we explicitly handle EOF different
from a libarchive error.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 years agocodec: avcodec: set low delay on low fps
Francois Cartegnie [Wed, 25 Jul 2018 20:10:36 +0000 (22:10 +0200)]
codec: avcodec: set low delay on low fps

fixes non frame output with low fps videos

refs #20740

3 years agodemux: avi: fix unread audio chunks
Francois Cartegnie [Wed, 25 Jul 2018 15:11:05 +0000 (17:11 +0200)]
demux: avi: fix unread audio chunks

need to rewrite all that legacy 0.9.x crap...
if only we could fully understand and avoid further regressions

3 years agodec: update pause/rate when the output is restarted
Thomas Guillem [Thu, 5 Jul 2018 09:57:38 +0000 (11:57 +0200)]
dec: update pause/rate when the output is restarted

The aout/vout paused/rate state was not set if the output was restarted within
the lifetime of the decoder.

3 years agodec: lock aout/vout when read from DecoderThread
Thomas Guillem [Mon, 2 Jul 2018 12:43:26 +0000 (14:43 +0200)]
dec: lock aout/vout when read from DecoderThread

3 years agodec: reindent and remove useless check
Thomas Guillem [Wed, 25 Jul 2018 15:40:25 +0000 (17:40 +0200)]
dec: reindent and remove useless check

3 years agodec: hold the vout from the spu decoder
Thomas Guillem [Wed, 25 Jul 2018 15:39:14 +0000 (17:39 +0200)]
dec: hold the vout from the spu decoder

This fixes a possible segfault from the new input_DecoderSetSpuHighlight
function, that could reference a destroyed vout.

NB: Calling control and spu functions from a closed vout is legal. It just
won't have any effects. The vout desctructor, when all reference are released,
will clean-up SPU controls.

3 years agodec: fix fmt_out.i_cat data-race
Thomas Guillem [Wed, 25 Jul 2018 15:31:32 +0000 (17:31 +0200)]
dec: fix fmt_out.i_cat data-race

Check fmt_in.i_cat, that is constant, instead of fmt_out.i_cat (that can be
overwritten with the same value from module threads).

3 years agoes_out: fix double lock
Thomas Guillem [Wed, 25 Jul 2018 15:28:35 +0000 (17:28 +0200)]
es_out: fix double lock

Regression from 8b9df99194e9609bbfa5e545034227917c221e85

3 years agoinput_resource: use vout_configuration_t for vout requests
Thomas Guillem [Wed, 25 Jul 2018 12:26:38 +0000 (14:26 +0200)]
input_resource: use vout_configuration_t for vout requests

Since this functions started to have way too many params.

3 years agovout: remove useless change_fmt param
Thomas Guillem [Wed, 25 Jul 2018 12:34:09 +0000 (14:34 +0200)]
vout: remove useless change_fmt param

change_fmt was always true when fmt was valid and false when fmt was NULL.

3 years agovout: move input_thread out of vout_configuration_t
Thomas Guillem [Wed, 25 Jul 2018 12:07:02 +0000 (14:07 +0200)]
vout: move input_thread out of vout_configuration_t

It's needed by the vout only to get input attachments of spu filters.

Possible improvement: the input thread should propagate fonts attachments to
the vout when it fetches a new one from the demuxer

3 years agomedia library: Add playlist helpers
Hamza Parnica [Tue, 24 Jul 2018 15:38:01 +0000 (17:38 +0200)]
media library: Add playlist helpers

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
3 years agoplaylist: item: playlist_Preparse: use vlc_MetadataRequest
Filip Roséen [Wed, 25 Jul 2018 02:06:40 +0000 (04:06 +0200)]
playlist: item: playlist_Preparse: use vlc_MetadataRequest

As the functionality provided by the externally accessible
libvlc_MetadataRequest is not satisfactory for the usage in
playlist_Preparse, the call has been replaced by an invocation of
vlc_MetadataRequest (that will not result in indefinite recursion).

fixes: #18236
refs: #20865
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agocore: libvlc_MetadataRequest: use vlc_MetadataRequest
Filip Roséen [Wed, 25 Jul 2018 02:06:39 +0000 (04:06 +0200)]
core: libvlc_MetadataRequest: use vlc_MetadataRequest

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agocore: add vlc_MetadataRequest
Filip Roséen [Wed, 25 Jul 2018 02:06:38 +0000 (04:06 +0200)]
core: add vlc_MetadataRequest

This function is to be used by entities within the core that would
like to spawn a metadata request. Such request will not have the
implicit recursiveness of libvlc_MetadataRequest (which is to be
called by users of libvlc).

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
3 years agoaccess: screen: Close: release blend filter if created
Filip Roséen [Wed, 25 Jul 2018 01:54:07 +0000 (03:54 +0200)]
access: screen: Close: release blend filter if created

This is necessary for quite obvious reasons.

fixes: #20831
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 years agocontrol: oldrc: make it possible to adjust volume without playback
Filip Roséen [Wed, 25 Jul 2018 01:51:15 +0000 (03:51 +0200)]
control: oldrc: make it possible to adjust volume without playback

I don't know why 33464eacd6e introduced logic to prevent volume change
if the input is either paused, or not at all present, but from a
user's perspective this is not intuitive (as one of course can
adjust the volume even if nothing is playing).

fixes: #20897
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 years agoaccess: vcd: cdrom: extensions are case-insensitive
Filip Roséen [Wed, 25 Jul 2018 01:50:51 +0000 (03:50 +0200)]
access: vcd: cdrom: extensions are case-insensitive

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>