p_owner->b_paused can only be written by the owner, so the owner thread
does not need to lock to read it. (However, locking is necessary to
write it from the owner thread, or to read it from the decoder thread.)
There is nothing special about exiting at this level. The decoder
should discard its buffers and return to reading the input FIFO at the
earliest (where it gets canceled). This is the same as flushing.
Thomas Guillem [Wed, 18 Mar 2015 09:16:44 +0000 (09:16 +0000)]
decoder: fix race in spu_new_buffer
There is a race when starting video with subtitles at a given position (via
--start-time).
If all decoders are flushed early, the video decoder may not have created the
Vout via the decoder_NewPicture call. In that case, spu_new_buffer will be
blocking for 6 seconds. Indeed, spu_new_buffer can block for maximum 6 seconds
when it's waiting for a Vout.
To solve this race, abort spu_new_buffer if decoder is flushing.
How to reproduce the race condition:
./vlc --start-time 3600 <video_with_subtitles>
Miha Sokolov [Fri, 20 Mar 2015 09:38:51 +0000 (09:38 +0000)]
fix teletext framing code in DVB PES packets ignored
Check the teletext framing code in PES buffer for each of the received lines
and only copy those with correct framing code (p_block->p_buffer[3]) to the
p_sliced buffer that is later forwarded to ZVBI vbi_decode. Invalid lines
will not reach vbi_decode anymore.
When also packets with erroneous framing code are sent to vbi_decode (often
0x00 with some noise), in most cases those are decoded as packet 1/2,
causing the second text line on the teletext page to be overwritten with
spaces. So we need to avoid sending such packets with invalid framing code
to vbi_decode.
ALSA: request large enough buffers first (refs #10422)
With the current input clock and decoder buffering code, getting large
buffers is essential. So favor that over having short audio periods.
(Ideally the audio period should probably be an half or a third of the
PTS delay, rather than hard-coded to 40 ms, but that is a separate
issue).
In some cases, the thread(s) consuming a FIFO needs to wake up in other
circumstances than the FIFO being non-empty. For that purpose, this new
set of functions is vastly more flexible than block_FifoWake().
Calling input_DecoderStopWait() from the decoder thread makes no sense
as it signals a condition variable that only the decoder thread itself
would ever wait on.
More importantly, the call breaks assumptions made by the input thread.
For instance, input_DecoderDecode() assumes p_owner->b_waiting is only
changed by the decoder owner (i.e. input) thread.
Steve Lhomme [Wed, 18 Mar 2015 09:57:55 +0000 (09:57 +0000)]
DMO: use COINIT_MULTITHREADED instead of COINIT_APARTMENTTHREADED
Fixes #14202
All the other CoInitializeEx() calls and now using multithreading, except for
this code which is called in UpdateRects()
See modules/video_output/msw/common.c l286
p_dec->fmt_out is owned by the decoder plugin, and can only safely be
accessed by the core from within decoder callbacks, notably the format
update callbacks.
Outside that context, p_owner->fmt has to be used. It contains a copy
of p_dec->fmt_out at the last format update.
On ma, 2015-03-16 at 13:59 +0300, Rémi Denis-Courmont wrote:
> Le 2015-03-16 13:24, Petri Hintukainen a écrit :
> > I tried to enable dsm access plugin in Linux (to get directory
> > browsing
> > support). But "make install" failed with error:
> >
> > libtool: install: error: cannot install `libdsm_plugin.la' to a
> > directory not ending in /usr/lib/vlc/plugins/services_discovery
> >
> > It looks like the module is installed twice: first to access/, then
> > to
> > services_discovery/. Installing it only to services_discovery/ seems
> > to
> > work.
>
> The (rest of the) Makefile rules are in access/ though...
Removing it from services_discovery/Makefile.am in commit
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42350148049e6a91db1f6876d1e0765640da0f7d
didn't fix the problem with make install.
With
../configure --prefix=/usr --enable-dsm --disable-smb
make && sudo make install
I still get
libtool: install: error: cannot install `libdsm_plugin.la' to a
directory not ending in /usr/lib/vlc/plugins/services_discovery
build: check for gmtime_r and localtime_r with the new macro.
This makes sure that the two functions are found when building on mingw32,
as the functions are defined as static inline rather than as library
symbols.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
build: create a macro to check for, and replace, possibly-inline functions.
mingw (both 32 and 64) provides a number of functions that have no C
linkage, but are only available as static inline. Define a macro that can
check for the function declaration but acts like AC_REPLACE_FUNC.
Use the new macro for asprintf/vasprintf (previously implemented in
configure.ac directly).
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>