[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#990373: marked as done (unblock: vlc/3.0.16-1)



Your message dated Thu, 1 Jul 2021 15:30:23 +0200
with message-id <215a9a06-f11a-b611-0d86-8dff7c63c2bf@debian.org>
and subject line Re: Bug#990373: unblock: vlc/3.0.16-1
has caused the Debian Bug report #990373,
regarding unblock: vlc/3.0.16-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
990373: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990373
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: sramacher@debian.org

Please unblock package vlc.

[ Reason ]
vlc 3.0.16 is the latest bug fix release in the 3.0.x series. We follow
this series also in buster and have updated to new bug fix releases in
the past via DSAs.

With the jump from 3.0.12 to 3.0.16, three security issues will be
fixed: a remote code execution bug exploitable via crafted playlists, a
buffer overflow in the mp4 decoder, an a invalid free in the kate
decoder. See https://www.videolan.org/security/sb-vlc3013.html for more
details.

[ Impact ]
If not unblocked now, we will fix the security issue later via a DSA.

[ Tests ]
I've been using 3.0.16 since it's available in unstable and noticed no
regressions so far.

[ Risks ]

While 3.0.13 already fixed the security issues , it also introduced some
regressions which required some follow up releases. It turned out that all
of the regressions only affected Windows. Since this wasn't clear in the
beginning, I waited for the 3.0.16 release to upload the new vlc version
to unstable.

The diff between 3.0.12-3 and 3.0.16-1 appears to be huge at first, but
most of the changes are either new translation updates, autotools cruft,
or are macosx / Windows only. Commented diffstat below:

 po/ach.gmo                                                          |binary
 po/af.gmo                                                           |binary
 po/am.gmo                                                           |binary
 po/am_ET.gmo                                                        |binary
 po/an.gmo                                                           |binary
 po/ar.gmo                                                           |binary
 po/as_IN.gmo                                                        |binary
 po/ast.gmo                                                          |binary
 po/be.gmo                                                           |binary
 po/bg.gmo                                                           |binary
 po/bn.gmo                                                           |binary
 po/bn_IN.gmo                                                        |binary
 po/br.gmo                                                           |binary
 po/brx.gmo                                                          |binary
 po/bs.gmo                                                           |binary
 po/ca.gmo                                                           |binary
 po/ca@valencia.gmo                                                  |binary
 po/cgg.gmo                                                          |binary
 po/co.gmo                                                           |binary
 po/cs.gmo                                                           |binary
 po/cy.gmo                                                           |binary
 po/da.gmo                                                           |binary
 po/de.gmo                                                           |binary
 po/el.gmo                                                           |binary
 po/en_GB.gmo                                                        |binary
 po/es.gmo                                                           |binary
 po/es_MX.gmo                                                        |binary
 po/et.gmo                                                           |binary
 po/eu.gmo                                                           |binary
 po/fa.gmo                                                           |binary
 po/ff.gmo                                                           |binary
 po/fi.gmo                                                           |binary
 po/fr.gmo                                                           |binary
 po/fur.gmo                                                          |binary
 po/fy.gmo                                                           |binary
 po/ga.gmo                                                           |binary
 po/gd.gmo                                                           |binary
 po/gl.gmo                                                           |binary
 po/gu.gmo                                                           |binary
 po/he.gmo                                                           |binary
 po/hi.gmo                                                           |binary
 po/hr.gmo                                                           |binary
 po/hu.gmo                                                           |binary
 po/hy.gmo                                                           |binary
 po/id.gmo                                                           |binary
 po/is.gmo                                                           |binary
 po/it.gmo                                                           |binary
 po/ja.gmo                                                           |binary
 po/ka.gmo                                                           |binary
 po/kab.gmo                                                          |binary
 po/kk.gmo                                                           |binary
 po/km.gmo                                                           |binary
 po/kn.gmo                                                           |binary
 po/ko.gmo                                                           |binary
 po/ks_IN.gmo                                                        |binary
 po/ku_IQ.gmo                                                        |binary
 po/ky.gmo                                                           |binary
 po/lg.gmo                                                           |binary
 po/lt.gmo                                                           |binary
 po/lv.gmo                                                           |binary
 po/mai.gmo                                                          |binary
 po/ml.gmo                                                           |binary
 po/mn.gmo                                                           |binary
 po/mr.gmo                                                           |binary
 po/ms.gmo                                                           |binary
 po/nb.gmo                                                           |binary
 po/ne.gmo                                                           |binary
 po/nl.gmo                                                           |binary
 po/nn.gmo                                                           |binary
 po/oc.gmo                                                           |binary
 po/pa.gmo                                                           |binary
 po/pl.gmo                                                           |binary
 po/ps.gmo                                                           |binary
 po/pt_BR.gmo                                                        |binary
 po/pt_PT.gmo                                                        |binary
 po/ro.gmo                                                           |binary
 po/ru.gmo                                                           |binary
 po/si.gmo                                                           |binary
 po/sk.gmo                                                           |binary
 po/sl.gmo                                                           |binary
 po/sq.gmo                                                           |binary
 po/sr.gmo                                                           |binary
 po/sv.gmo                                                           |binary
 po/ta.gmo                                                           |binary
 po/te.gmo                                                           |binary
 po/th.gmo                                                           |binary
 po/tr.gmo                                                           |binary
 po/tt.gmo                                                           |binary
 po/ug.gmo                                                           |binary
 po/uk.gmo                                                           |binary
 po/uz.gmo                                                           |binary
 po/vi.gmo                                                           |binary
 po/wa.gmo                                                           |binary
 po/zh_CN.gmo                                                        |binary
 po/zh_TW.gmo                                                        |binary
 po/zu.gmo                                                           |binary
 po/POTFILES.in                                                                      |  108 
 po/ach.po                                                                           | 2528 
 po/af.po                                                                            | 2498 
 po/am.po                                                                            | 2544 
 po/am_ET.po                                                                         | 2443 
 po/an.po                                                                            | 2643 
 po/ar.po                                                                            | 2871 
 po/as_IN.po                                                                         | 2799 
 po/ast.po                                                                           | 2610 
 po/be.po                                                                            | 2717 
 po/bg.po                                                                            | 2648 
 po/bn.po                                                                            | 6139 +
 po/bn_IN.po                                                                         | 2615 
 po/br.po                                                                            | 2508 
 po/brx.po                                                                           | 2718 
 po/bs.po                                                                            | 2497 
 po/ca.po                                                                            | 3366 -
 po/ca@valencia.po                                                                   | 2726 
 po/cgg.po                                                                           | 2434 
 po/co.po                                                                            | 2583 
 po/cs.po                                                                            | 3026 
 po/cy.po                                                                            | 2639 
 po/da.po                                                                            | 2889 
 po/de.po                                                                            | 3066 
 po/el.po                                                                            | 9121 +-
 po/en_GB.po                                                                         | 2416 
 po/es.po                                                                            | 3021 
 po/es_MX.po                                                                         | 2963 
 po/et.po                                                                            | 2712 
 po/eu.po                                                                            | 3124 -
 po/fa.po                                                                            | 2460 
 po/ff.po                                                                            | 2531 
 po/fi.po                                                                            | 5601 +
 po/fr.po                                                                            | 3077 -
 po/fur.po                                                                           | 3199 -
 po/fy.po                                                                            | 2780 
 po/ga.po                                                                            | 2568 
 po/gd.po                                                                            | 3775 -
 po/gl.po                                                                            | 3143 -
 po/gu.po                                                                            | 2754 
 po/he.po                                                                            | 3377 -
 po/hi.po                                                                            | 3071 
 po/hr.po                                                                            | 2723 
 po/hu.po                                                                            | 3082 -
 po/hy.po                                                                            | 2552 
 po/id.po                                                                            | 2714 
 po/is.po                                                                            | 2917 
 po/it.po                                                                            | 3047 
 po/ja.po                                                                            | 3037 
 po/ka.po                                                                            | 2623 
 po/kab.po                                                                           | 2445 
 po/kk.po                                                                            | 2547 
 po/km.po                                                                            | 2724 
 po/kn.po                                                                            | 2731 
 po/ko.po                                                                            | 3025 
 po/ks_IN.po                                                                         | 2784 
 po/ku_IQ.po                                                                         | 2440 
 po/ky.po                                                                            | 2437 
 po/lg.po                                                                            | 2502 
 po/lt.po                                                                            | 2657 
 po/lv.po                                                                            | 3088 -
 po/mai.po                                                                           | 2738 
 po/ml.po                                                                            | 2962 
 po/mn.po                                                                            | 2673 
 po/mr.po                                                                            | 2744 
 po/ms.po                                                                            | 3455 -
 po/nb.po                                                                            | 2958 
 po/ne.po                                                                            | 2525 
 po/nl.po                                                                            | 3161 -
 po/nn.po                                                                            | 2680 
 po/oc.po                                                                            | 2816 
 po/pa.po                                                                            | 2611 
 po/pl.po                                                                            | 3095 -
 po/ps.po                                                                            | 2448 
 po/pt_BR.po                                                                         | 3858 -
 po/pt_PT.po                                                                         | 3010 
 po/ro.po                                                                            | 2630 
 po/ru.po                                                                            | 3027 
 po/si.po                                                                            | 2568 
 po/sk.po                                                                            | 3178 -
 po/sl.po                                                                            | 3182 -
 po/sq.po                                                                            | 2427 
 po/sr.po                                                                            | 2566 
 po/sv.po                                                                            | 3068 
 po/ta.po                                                                            | 2452 
 po/te.po                                                                            | 2520 
 po/th.po                                                                            | 2631 
 po/tr.po                                                                            | 3130 -
 po/tt.po                                                                            | 2437 
 po/ug.po                                                                            | 2405 
 po/uk.po                                                                            | 2991 
 po/uz.po                                                                            | 2529 
 po/vi.po                                                                            | 2784 
 po/vlc.pot                                                                          | 2351 
 po/wa.po                                                                            | 2570 
 po/zh_CN.po                                                                         | 3024 
 po/zh_TW.po                                                                         | 3186 -
 po/zu.po                                                                            | 2560 
 share/vlc.desktop.in                                                                |   51 

Translation updates

 ChangeLog                                                                           |30727 ----------
 doc/ChangeLog-2003                                                                  |   10 
 doc/ChangeLog-2004                                                                  |   12 
 doc/ChangeLog-2006                                                                  |    6 
 doc/ChangeLog-2008                                                                  |    6 
 doc/ChangeLog-2013                                                                  |    6 
 doc/ChangeLog-2017                                                                  |   30 
 doc/ChangeLog-2018                                                                  |23943 +++++++
 doc/ChangeLog-2019                                                                  | 6348 ++
 doc/ChangeLog-2020                                                                  |11382 +++
 doc/ChangeLog-2021                                                                  | 2923 

Generated changelog from git

 Makefile.in                                                                         |    6 
 autotools/compile                                                                   |    6 
 autotools/depcomp                                                                   |    2 
 autotools/install-sh                                                                |  161 
 autotools/ltmain.sh                                                                 |    4 
 autotools/missing                                                                   |    2 
 autotools/test-driver                                                               |   10 
 autotools/ylwrap                                                                    |    2 
 config.h.in                                                                         |    3 
 configure                                                                           |  114 
 doc/Makefile.in                                                                     |    6 
 m4/libtool.m4                                                                       |    4 
 modules/Makefile.in                                                                 |   86 

Re-generated autotools files

 contrib/src/aom/rules.mak                                                           |    4 
 contrib/src/bluray/SHA512SUMS                                                       |    2 
 contrib/src/bluray/rules.mak                                                        |    2 
 contrib/src/cddb/no-gettext.patch                                                   |   13 
 contrib/src/cddb/rules.mak                                                          |    3 
 contrib/src/d3d11/SHA512SUMS                                                        |    4 
 contrib/src/d3d11/rules.mak                                                         |   42 
 contrib/src/d3d9/rules.mak                                                          |    4 
 contrib/src/dav1d/0001-SSE2-PIC-464ca6c2.patch                                      |  380 
 contrib/src/dav1d/SHA512SUMS                                                        |    2 
 contrib/src/dav1d/rules.mak                                                         |    3 
 contrib/src/dvdcss/SHA512SUMS                                                       |    2 
 contrib/src/dvdcss/rules.mak                                                        |    2 
 contrib/src/dvdnav/SHA512SUMS                                                       |    2 
 contrib/src/dvdnav/rules.mak                                                        |    2 
 contrib/src/dvdread/SHA512SUMS                                                      |    2 
 contrib/src/dvdread/rules.mak                                                       |    2 
 contrib/src/ebml/SHA512SUMS                                                         |    2 
 contrib/src/ebml/rules.mak                                                          |    2 
 contrib/src/ffmpeg/0001-avcodec-mpeg12dec-don-t-call-hw-end_frame-when-start.patch  |   36 
 contrib/src/ffmpeg/0002-avcodec-mpeg12dec-don-t-end-a-slice-without-first_sl.patch  |   49 
 contrib/src/ffmpeg/rules.mak                                                        |    2 
 contrib/src/freetype2/SHA512SUMS                                                    |    2 
 contrib/src/freetype2/rules.mak                                                     |    2 
 contrib/src/gettext/0001-libasprintf-On-mingw-really-use-our-vasprintf-functi.patch |  105 
 contrib/src/gettext/0002-libasprintf-Avoid-compilation-error-on-mingw-with-D_.patch |   43 
 contrib/src/gettext/rules.mak                                                       |    2 
 contrib/src/gnutls/0001-stat-fstat-Fix-when-compiling-for-versions-older-tha.patch  |   67 
 contrib/src/gnutls/rules.mak                                                        |    3 
 contrib/src/harfbuzz/0003-Fix-winstore-app-detection-with-mingw64.patch             |    2 
 contrib/src/harfbuzz/0004-Don-t-treat-Wunused-as-an-error.patch                     |   47 
 contrib/src/harfbuzz/SHA512SUMS                                                     |    2 
 contrib/src/harfbuzz/rules.mak                                                      |    5 
 contrib/src/lame/lame-fix-i386-on-aarch64.patch                                     |   21 
 contrib/src/lame/rules.mak                                                          |    3 
 contrib/src/libarchive/configure.ac-add-AC_PROG_CPP.patch                           |   27 
 contrib/src/libarchive/rules.mak                                                    |    1 
 contrib/src/live555/DISABLE_LOOPBACK_IP_ADDRESS_CHECK.patch                         |   19 
 contrib/src/live555/rules.mak                                                       |    5 
 contrib/src/matroska/SHA512SUMS                                                     |    2 
 contrib/src/matroska/rules.mak                                                      |    2 
 contrib/src/mpg123/SHA512SUMS                                                       |    2 
 contrib/src/mpg123/fix-arm_fpu.patch                                                |   23 
 contrib/src/mpg123/rules.mak                                                        |    5 
 contrib/src/nfs/SHA512SUMS                                                          |    2 
 contrib/src/nfs/mingw-snprintf.patch                                                |   11 
 contrib/src/nfs/rules.mak                                                           |    4 
 contrib/src/nfs/win32.patch                                                         |   65 
 contrib/src/smb2/SHA512SUMS                                                         |    2 
 contrib/src/smb2/rules.mak                                                          |    2 
 contrib/src/vpx/rules.mak                                                           |    3 
 contrib/src/zvbi/rules.mak                                                          |    3 

The contrib build system is not used by the Debian package.

 extras/package/macosx/build.sh                                                      |    8 
 extras/package/macosx/dmg/dmg_settings.py                                           |    2 
 extras/package/macosx/package.mak                                                   |    4 
 extras/package/macosx/vlc.xcodeproj/project.pbxproj                                 |   14 
 extras/package/win32/NSIS/languages/BretonExtra.nsh                                 |    8 
 extras/package/win32/NSIS/languages/EstonianExtra.nsh                               |    2 
 extras/package/win32/NSIS/languages/GreekExtra.nsh                                  |   64 
 extras/package/win32/NSIS/languages/MalayExtra.nsh                                  |    6 
 extras/package/win32/NSIS/languages/ScotsGaelicExtra.nsh                            |    2 
 extras/package/win32/NSIS/vlc.win32.nsi.in                                          |    4 

Windows and Mac OS X packaging.

 modules/gui/macosx/Makefile.am                                                      |   58 
 modules/gui/macosx/PXSourceList/Internal/PXSourceListDelegateDataSourceProxy.h      |    4 
 modules/gui/macosx/PXSourceList/Internal/PXSourceListDelegateDataSourceProxy.m      |    6 
 modules/gui/macosx/PXSourceList/PXSourceList.m                                      |    8 
 modules/gui/macosx/Resources/an.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/as-IN.lproj/InfoPlist.strings                          |   10 
 modules/gui/macosx/Resources/ast.lproj/InfoPlist.strings                            |   10 
 modules/gui/macosx/Resources/be.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/bn-IN.lproj/InfoPlist.strings                          |   10 
 modules/gui/macosx/Resources/br.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/brx.lproj/InfoPlist.strings                            |   10 
 modules/gui/macosx/Resources/co.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/cy.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/da.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/el.lproj/InfoPlist.strings                             |   16 
 modules/gui/macosx/Resources/en-GB.lproj/InfoPlist.strings                          |   10 
 modules/gui/macosx/Resources/es-MX.lproj/InfoPlist.strings                          |   10 
 modules/gui/macosx/Resources/et.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/eu.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/fa.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/fi.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/ga.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/gd.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/gu-IN.lproj/InfoPlist.strings                          |   10 
 modules/gui/macosx/Resources/hi.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/hr.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/id.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/is.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/ka.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/kab.lproj/InfoPlist.strings                            |   10 
 modules/gui/macosx/Resources/kk.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/km.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/kn.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/ko.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/ku.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/lt.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/ml.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/mr.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/ms.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/my.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/nb.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/ne.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/nn.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/oc.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/pa.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/ru.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/sat.lproj/InfoPlist.strings                            |   10 
 modules/gui/macosx/Resources/sc.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/si.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/sq.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/sr.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/th.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/vi.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/wa.lproj/InfoPlist.strings                             |   10 
 modules/gui/macosx/Resources/zh-Hant.lproj/InfoPlist.strings                        |   10 
 modules/gui/macosx/SPMediaKeyTap.h                                                  |   44 
 modules/gui/macosx/SPMediaKeyTap.m                                                  |  179 
 modules/gui/macosx/UI/SimplePreferences.xib                                         |  565 
 modules/gui/macosx/UI/VLCFullScreenPanel.xib                                        |  126 
 modules/gui/macosx/VLCAddonsWindowController.m                                      |    4 
 modules/gui/macosx/VLCControlsBarCommon.m                                           |   14 
 modules/gui/macosx/VLCCoreInteraction.h                                             |    9 
 modules/gui/macosx/VLCCoreInteraction.m                                             |  158 
 modules/gui/macosx/VLCFSPanelController.m                                           |   37 
 modules/gui/macosx/VLCInputManager.h                                                |    5 
 modules/gui/macosx/VLCInputManager.m                                                |   20 
 modules/gui/macosx/VLCMainWindow.h                                                  |    9 
 modules/gui/macosx/VLCMainWindow.m                                                  |  330 
 modules/gui/macosx/VLCOpenWindowController.m                                        |   29 
 modules/gui/macosx/VLCRemoteControlService.h                                        |   36 
 modules/gui/macosx/VLCRemoteControlService.m                                        |  297 
 modules/gui/macosx/VLCSidebarDataSource.h                                           |   42 
 modules/gui/macosx/VLCSidebarDataSource.m                                           |  359 
 modules/gui/macosx/VLCSimplePrefsController.m                                       |    9 
 modules/gui/macosx/VLCTimeField.h                                                   |    7 
 modules/gui/macosx/VLCTimeField.m                                                   |   61 
 modules/gui/macosx/prefs.m                                                          |   12 
 modules/gui/macosx/prefs_widgets.m                                                  |    4 

Mac OS X GUI

 modules/video_output/win32/builtin_shaders.h                                        |    6 
 modules/video_output/win32/direct3d11.c                                             |  103 

Windows only video output

So we end up with:

 Makefile.am                                                                         |    2 
 NEWS                                                                                |  104 
 configure.ac                                                                        |   15 
 debian/changelog                                                                    |   17 
 debian/patches/0004-qt-add-a-private-structure-for-window-provider.patch            |   88 
 debian/patches/0005-qt-create-another-indirection-X11-window.patch                  |  148 
 debian/patches/0006-qt-reparent-video-window-to-root-whence-UI-closes.patch         |  106 
 debian/patches/series                                                               |    3 
 doc/Makefile.am                                                                     |    6 
 include/vlc_codecs.h                                                                |    8 
 modules/MODULES_LIST                                                                |    7 
 modules/access/dcp/dcp.cpp                                                          |    2 
 modules/access/dvdnav.c                                                             |   11 
 modules/access/dvdread.c                                                            |   11 
 modules/access/ftp.c                                                                |    4 
 modules/access/rist.c                                                               |   10 
 modules/access/smb2.c                                                               |  113 
 modules/audio_output/file.c                                                         |    4 
 modules/audio_output/sndio.c                                                        |    2 
 modules/codec/daala.c                                                               |    2 
 modules/codec/dav1d.c                                                               |    8 
 modules/codec/fluidsynth.c                                                          |    7 
 modules/codec/kate.c                                                                |    3 
 modules/codec/libass.c                                                              |   47 
 modules/codec/omxil/OMX_Types.h                                                     |   20 
 modules/codec/omxil/mediacodec.c                                                    |    2 
 modules/codec/webvtt/subsvtt.c                                                      |  140 
 modules/codec/x264.c                                                                |    4 
 modules/demux/adaptive/Streams.cpp                                                  |    4 
 modules/demux/adaptive/playlist/Inheritables.cpp                                    |    1 
 modules/demux/adaptive/playlist/SegmentInformation.cpp                              |    1 
 modules/demux/adaptive/playlist/SegmentTimeline.cpp                                 |    3 
 modules/demux/adaptive/plumbing/FakeESOutID.cpp                                     |    4 
 modules/demux/asf/asf.c                                                             |    2 
 modules/demux/asf/asfpacket.c                                                       |    9 
 modules/demux/av1_unpack.h                                                          |    2 
 modules/demux/avi/avi.c                                                             |    8 
 modules/demux/hls/playlist/Parser.cpp                                               |    1 
 modules/demux/mkv/matroska_segment.cpp                                              |    3 
 modules/demux/mkv/mkv.cpp                                                           |    3 
 modules/demux/mp4/libmp4.c                                                          |   36 
 modules/demux/mp4/mp4.c                                                             |    3 
 modules/demux/mpeg/h26x.c                                                           |   72 
 modules/demux/mpeg/ts_hotfixes.c                                                    |    4 
 modules/demux/subtitle.c                                                            |   10 
 modules/gui/qt/components/complete_preferences.cpp                                  |    5 
 modules/gui/qt/components/interface_widgets.cpp                                     |   11 
 modules/gui/qt/components/playlist/standardpanel.cpp                                |    6 
 modules/gui/qt/components/preferences_widgets.cpp                                   |   14 
 modules/gui/qt/main_interface.cpp                                                   |    4 
 modules/gui/qt/qt.cpp                                                               |  117 
 modules/gui/qt/ui/sprefs_subtitles.ui                                               |    2 
 modules/gui/qt/util/customwidgets.cpp                                               |   32 
 modules/lua/vlc.h                                                                   |    3 
 modules/meta_engine/folder.c                                                        |    4 
 modules/misc/gnutls.c                                                               |    2 
 modules/packetizer/avparser.c                                                       |   56 
 modules/packetizer/hevc.c                                                           |   10 
 modules/stream_out/chromaprint.c                                                    |    2 
 modules/stream_out/mosaic_bridge.c                                                  |    5 
 modules/stream_out/transcode/transcode.c                                            |    4 
 modules/text_renderer/freetype/text_layout.c                                        |    6 
 modules/text_renderer/svg.c                                                         |    4 
 share/lua/playlist/liveleak.lua                                                     |   56 
 share/lua/playlist/soundcloud.lua                                                   |   22 
 share/lua/playlist/youtube.lua                                                      |   21 
 src/input/es_out_timeshift.c                                                        |    4 
 src/input/input.c                                                                   |   30 
 src/libvlc-module.c                                                                 |    4 
 src/misc/update.c                                                                   |    4 
 src/misc/update_crypto.c                                                            |   30 
 src/network/httpd.c                                                                 |   43 
 src/posix/thread.c                                                                  |    2 
 src/revision.c                                                                      |    2 
 src/revision.txt                                                                    |    2 
 src/test/url.c                                                                      |   22 
 src/text/iso-639_def.h                                                              |    3 
 src/text/url.c                                                                      |   21 
 src/video_output/video_epg.c                                                        |    8 
 src/video_output/video_widgets.c                                                    |   29 

The debdiff generated with filterdiff -x "*.po" -x "*.gmo" -x
"*/macosx/*" -x "*/extras/*" -x "*/configure" -x "*/doc/*" -x
"*/contrib/*" -x "*/*.in" -x "*/vlc.pot" -x "*/libtool.m4" -x
"*/autotools/*" -x "*/ChangeLog" -x "*/win32/*" is attached.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes (that affect Debian) and I approve them
  [x] attach debdiff against the package in testing


unblock vlc/3.0.16-1

Cheers
-- 
Sebastian Ramacher
diff -Nru vlc-3.0.12/configure.ac vlc-3.0.16/configure.ac
--- vlc-3.0.12/configure.ac	2021-01-17 21:31:56.000000000 +0100
+++ vlc-3.0.16/configure.ac	2021-06-18 09:14:43.000000000 +0200
@@ -1,11 +1,11 @@
 dnl Autoconf settings for vlc
 
-AC_COPYRIGHT([Copyright 1999-2020 VLC authors and VideoLAN])
+AC_COPYRIGHT([Copyright 1999-2021 VLC authors and VideoLAN])
 
-AC_INIT(vlc, 3.0.12)
+AC_INIT(vlc, 3.0.16)
 VERSION_MAJOR=3
 VERSION_MINOR=0
-VERSION_REVISION=12
+VERSION_REVISION=16
 VERSION_EXTRA=0
 VERSION_DEV=
 
@@ -14,7 +14,7 @@
 
 CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
 CODENAME="Vetinari"
-COPYRIGHT_YEARS="1996-2020"
+COPYRIGHT_YEARS="1996-2021"
 
 AC_CONFIG_SRCDIR(src/libvlc.c)
 AC_CONFIG_AUX_DIR(autotools)
@@ -2573,7 +2573,7 @@
 dnl
 dnl DXGI debug
 dnl
-AC_CHECK_HEADERS(dxgidebug.h dxgi1_6.h)
+AC_CHECK_HEADERS(dxgidebug.h dxgi1_6.h d3d11_4.h)
 
 dnl
 dnl  avformat demuxer/muxer plugin
@@ -4016,7 +4016,7 @@
 dnl
 dnl  SRT plugin
 dnl
-PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT])
+PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2 srt < 1.3.0], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT])
 
 EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
 dnl
@@ -4200,8 +4200,11 @@
       VLC_ADD_PLUGIN([osx_notifications])
       VLC_ADD_LIBS([osx_notifications], [-Wl,-framework,Growl,-framework,Foundation])
       VLC_ADD_OBJCFLAGS([osx_notifications], [-fobjc-exceptions] )
+  else
+      enable_osx_notifications="no"
   fi
 ])
+AM_CONDITIONAL(HAVE_OSX_NOTIFICATIONS, [test "$enable_osx_notifications" != "no"])
 
 dnl
 dnl Libnotify notification plugin
diff -Nru vlc-3.0.12/debian/changelog vlc-3.0.16/debian/changelog
--- vlc-3.0.12/debian/changelog	2021-03-09 17:42:00.000000000 +0100
+++ vlc-3.0.16/debian/changelog	2021-06-21 21:07:16.000000000 +0200
@@ -1,3 +1,20 @@
+vlc (3.0.16-1) unstable; urgency=medium
+
+  * Upload to unstable
+  * New upstream release
+
+ -- Sebastian Ramacher <sramacher@debian.org>  Mon, 21 Jun 2021 21:07:16 +0200
+
+vlc (3.0.15-1) experimental; urgency=medium
+
+  [ Mateusz Łukasik ]
+  * New upstream release
+    - Fix remote code execution through crafted playlist
+      (VideoLAN-SB-VLC-3013)
+  * Remove patches included upstream.
+
+ -- Sebastian Ramacher <sramacher@debian.org>  Thu, 17 Jun 2021 23:38:35 +0200
+
 vlc (3.0.12-3) unstable; urgency=medium
 
   * debian/patches: Apply upstream patches to prevent process freeze on exit
diff -Nru vlc-3.0.12/debian/patches/0004-qt-add-a-private-structure-for-window-provider.patch vlc-3.0.16/debian/patches/0004-qt-add-a-private-structure-for-window-provider.patch
--- vlc-3.0.12/debian/patches/0004-qt-add-a-private-structure-for-window-provider.patch	2021-03-09 17:30:13.000000000 +0100
+++ vlc-3.0.16/debian/patches/0004-qt-add-a-private-structure-for-window-provider.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,88 +0,0 @@
-From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= <remi@remlab.net>
-Date: Sat, 6 Feb 2021 15:00:02 +0200
-Subject: qt: add a private structure for window provider
-
----
- modules/gui/qt/qt.cpp | 33 ++++++++++++++++++++++-----------
- 1 file changed, 22 insertions(+), 11 deletions(-)
-
-diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
-index ab912fd..d5a22d9 100644
---- a/modules/gui/qt/qt.cpp
-+++ b/modules/gui/qt/qt.cpp
-@@ -708,6 +708,10 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg,
-  */
- static int WindowControl( vout_window_t *, int i_query, va_list );
- 
-+typedef struct {
-+    MainInterface *mi;
-+} vout_window_qt_t;
-+
- static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
- {
-     if( cfg->is_standalone )
-@@ -737,21 +741,26 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
-     if (unlikely(!active))
-         return VLC_EGENERIC;
- 
--    MainInterface *p_mi = p_intf->p_sys->p_mi;
-+    vout_window_qt_t *sys = new vout_window_qt_t;
-+
-+    sys->mi = p_intf->p_sys->p_mi;
-     msg_Dbg( p_wnd, "requesting video window..." );
- 
--    if( !p_mi->getVideo( p_wnd, cfg->width, cfg->height, cfg->is_fullscreen ) )
-+    if (!sys->mi->getVideo(p_wnd, cfg->width, cfg->height, cfg->is_fullscreen))
-+    {
-+        delete sys;
-         return VLC_EGENERIC;
-+    }
- 
-     p_wnd->info.has_double_click = true;
-     p_wnd->control = WindowControl;
--    p_wnd->sys = (vout_window_sys_t*)p_mi;
-+    p_wnd->sys = (vout_window_sys_t *)sys;
-     return VLC_SUCCESS;
- }
- 
- static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args )
- {
--    MainInterface *p_mi = (MainInterface *)p_wnd->sys;
-+    vout_window_qt_t *sys = (vout_window_qt_t *)p_wnd->sys;
-     QMutexLocker locker (&lock);
- 
-     if (unlikely(!active))
-@@ -759,12 +768,12 @@ static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args )
-         msg_Warn (p_wnd, "video already released before control");
-         return VLC_EGENERIC;
-     }
--    return p_mi->controlVideo( i_query, args );
-+    return sys->mi->controlVideo(i_query, args);
- }
- 
- static void WindowClose( vout_window_t *p_wnd )
- {
--    MainInterface *p_mi = (MainInterface *)p_wnd->sys;
-+    vout_window_qt_t *sys = (vout_window_qt_t *)p_wnd->sys;
-     QMutexLocker locker (&lock);
- 
-     /* Normally, the interface terminates after the video. In the contrary, the
-@@ -776,11 +785,13 @@ static void WindowClose( vout_window_t *p_wnd )
-      * That assumes the video output will behave sanely if it window is
-      * destroyed asynchronously.
-      * XCB and Xlib-XCB are fine with that. Plain Xlib wouldn't, */
--    if (unlikely(!active))
-+    if (likely(active))
-     {
--        msg_Warn (p_wnd, "video already released");
--        return;
-+        msg_Dbg(p_wnd, "releasing video...");
-+        sys->mi->releaseVideo();
-     }
--    msg_Dbg (p_wnd, "releasing video...");
--    p_mi->releaseVideo();
-+    else
-+        msg_Warn (p_wnd, "video already released");
-+
-+    delete sys;
- }
diff -Nru vlc-3.0.12/debian/patches/0005-qt-create-another-indirection-X11-window.patch vlc-3.0.16/debian/patches/0005-qt-create-another-indirection-X11-window.patch
--- vlc-3.0.12/debian/patches/0005-qt-create-another-indirection-X11-window.patch	2021-03-09 17:30:13.000000000 +0100
+++ vlc-3.0.16/debian/patches/0005-qt-create-another-indirection-X11-window.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,148 +0,0 @@
-From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= <remi@remlab.net>
-Date: Fri, 5 Feb 2021 19:25:48 +0200
-Subject: qt: create another indirection X11 window
-
-The main window may be destroyed before the video window. This notably
-occurs if the user requests to close the main UI via window decorations.
-While Qt allows those requests to be rejected, doing so would
-reintroduce obnoxious bug #4606.
-
-The Qt-X11 display connection will be closed as well as it belongs to
-the QApplication instance.
-
-This creates a separate window belonging to a separate display
-connection, and which is not tied to the QApplication and QMainWindow
-instances. Unfortunately, this adds yet another connection to the X11
-display server in the VLC process in addition to QApplication's and the
-video display's. And that connection won't process events.
-
-Refs #21875.
----
- modules/gui/qt/components/interface_widgets.cpp |  4 +-
- modules/gui/qt/qt.cpp                           | 59 ++++++++++++++++++++++++-
- 2 files changed, 61 insertions(+), 2 deletions(-)
-
-diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
-index bcf65d2..0dbefd1 100644
---- a/modules/gui/qt/components/interface_widgets.cpp
-+++ b/modules/gui/qt/components/interface_widgets.cpp
-@@ -227,13 +227,15 @@ QSize VideoWidget::physicalSize() const
-     return current_size;
- }
- 
-+void WindowResized(vout_window_t *, const QSize&);
-+
- void VideoWidget::reportSize()
- {
-     if( !p_window )
-         return;
- 
-     QSize size = physicalSize();
--    vout_window_ReportSize( p_window, size.width(), size.height() );
-+    WindowResized(p_window, size);
- }
- 
- /* Set the Widget to the correct Size */
-diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
-index d5a22d9..b900e74 100644
---- a/modules/gui/qt/qt.cpp
-+++ b/modules/gui/qt/qt.cpp
-@@ -361,6 +361,7 @@ static void Abort( void *obj )
- 
- #if defined (QT5_HAS_X11)
- # include <vlc_xlib.h>
-+# include <QX11Info>
- 
- static void *ThreadXCB( void *data )
- {
-@@ -710,6 +711,9 @@ static int WindowControl( vout_window_t *, int i_query, va_list );
- 
- typedef struct {
-     MainInterface *mi;
-+#ifdef QT5_HAS_X11
-+    Display *dpy;
-+#endif
- } vout_window_qt_t;
- 
- static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
-@@ -744,20 +748,69 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
-     vout_window_qt_t *sys = new vout_window_qt_t;
- 
-     sys->mi = p_intf->p_sys->p_mi;
-+    p_wnd->sys = (vout_window_sys_t *)sys;
-     msg_Dbg( p_wnd, "requesting video window..." );
- 
-+#ifdef QT5_HAS_X11
-+    Window xid;
-+
-+    if (QX11Info::isPlatformX11())
-+    {
-+        sys->dpy = XOpenDisplay(NULL);
-+        if (unlikely(sys->dpy == NULL))
-+        {
-+            delete sys;
-+            return VLC_EGENERIC;
-+        }
-+
-+        int snum = DefaultScreen(sys->dpy);
-+        unsigned long black = BlackPixel(sys->dpy, snum);
-+
-+        xid = XCreateSimpleWindow(sys->dpy, RootWindow(sys->dpy, snum),
-+                                  0, 0, cfg->width, cfg->height,
-+                                  0, black, black);
-+    }
-+#endif
-+
-     if (!sys->mi->getVideo(p_wnd, cfg->width, cfg->height, cfg->is_fullscreen))
-     {
-+#ifdef QT5_HAS_X11
-+        if (QX11Info::isPlatformX11())
-+            XCloseDisplay(sys->dpy);
-+#endif
-         delete sys;
-         return VLC_EGENERIC;
-     }
- 
-+#ifdef QT5_HAS_X11
-+    if (QX11Info::isPlatformX11())
-+    {
-+        XReparentWindow(sys->dpy, xid, p_wnd->handle.xid, 0, 0);
-+        XMapWindow(sys->dpy, xid);
-+        XSync(sys->dpy, True);
-+        p_wnd->handle.xid = xid;
-+    }
-+#endif
-     p_wnd->info.has_double_click = true;
-     p_wnd->control = WindowControl;
--    p_wnd->sys = (vout_window_sys_t *)sys;
-     return VLC_SUCCESS;
- }
- 
-+void WindowResized(vout_window_t *wnd, const QSize& size)
-+{
-+#ifdef QT5_HAS_X11
-+    vout_window_qt_t *sys = (vout_window_qt_t *)wnd->sys;
-+
-+    if (QX11Info::isPlatformX11())
-+    {
-+        XResizeWindow(sys->dpy, wnd->handle.xid, size.width(), size.height());
-+        XClearWindow(sys->dpy, wnd->handle.xid);
-+        XSync(sys->dpy, True);
-+    }
-+#endif
-+    vout_window_ReportSize(wnd, size.width(), size.height());
-+}
-+
- static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args )
- {
-     vout_window_qt_t *sys = (vout_window_qt_t *)p_wnd->sys;
-@@ -793,5 +846,9 @@ static void WindowClose( vout_window_t *p_wnd )
-     else
-         msg_Warn (p_wnd, "video already released");
- 
-+#if defined (QT5_HAS_X11)
-+    if (QX11Info::isPlatformX11())
-+        XCloseDisplay(sys->dpy);
-+#endif
-     delete sys;
- }
diff -Nru vlc-3.0.12/debian/patches/0006-qt-reparent-video-window-to-root-whence-UI-closes.patch vlc-3.0.16/debian/patches/0006-qt-reparent-video-window-to-root-whence-UI-closes.patch
--- vlc-3.0.12/debian/patches/0006-qt-reparent-video-window-to-root-whence-UI-closes.patch	2021-03-09 17:30:13.000000000 +0100
+++ vlc-3.0.16/debian/patches/0006-qt-reparent-video-window-to-root-whence-UI-closes.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,106 +0,0 @@
-From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= <remi@remlab.net>
-Date: Fri, 5 Feb 2021 19:46:15 +0200
-Subject: qt: reparent video window to root whence UI closes
-
-The video window has to exist until it is closed by its owner, i.e.
-WindowClose() is called. If it stayed as a child of the main UI window,
-it would be destroyed with the main UI window.
-
-This reparents it (back) to the root window before the main UI window
-gets destroyed. This works around #21875.
----
- modules/gui/qt/components/interface_widgets.cpp |  2 ++
- modules/gui/qt/main_interface.cpp               |  2 ++
- modules/gui/qt/qt.cpp                           | 25 +++++++++++++++++++++++++
- 3 files changed, 29 insertions(+)
-
-diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
-index 0dbefd1..cfebe61 100644
---- a/modules/gui/qt/components/interface_widgets.cpp
-+++ b/modules/gui/qt/components/interface_widgets.cpp
-@@ -228,6 +228,7 @@ QSize VideoWidget::physicalSize() const
- }
- 
- void WindowResized(vout_window_t *, const QSize&);
-+void WindowReleased(vout_window_t *);
- 
- void VideoWidget::reportSize()
- {
-@@ -377,6 +378,7 @@ void VideoWidget::release( void )
- 
-     if( stable )
-     {
-+        WindowReleased(p_window);
-         layout->removeWidget( stable );
-         stable->deleteLater();
-         stable = NULL;
-diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
-index bb5dad8..1f29f5e 100644
---- a/modules/gui/qt/main_interface.cpp
-+++ b/modules/gui/qt/main_interface.cpp
-@@ -1664,6 +1664,8 @@ void MainInterface::closeEvent( QCloseEvent *e )
- //  hide();
-     if ( b_minimalView )
-         setMinimalView( false );
-+    if( videoWidget )
-+        releaseVideoSlot();
-     emit askToQuit(); /* ask THEDP to quit, so we have a unique method */
-     /* Accept session quit. Otherwise we break the desktop mamager. */
-     e->accept();
-diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
-index b900e74..7f4c550 100644
---- a/modules/gui/qt/qt.cpp
-+++ b/modules/gui/qt/qt.cpp
-@@ -714,6 +714,8 @@ typedef struct {
- #ifdef QT5_HAS_X11
-     Display *dpy;
- #endif
-+    bool orphaned;
-+    QMutex lock;
- } vout_window_qt_t;
- 
- static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
-@@ -748,6 +750,7 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
-     vout_window_qt_t *sys = new vout_window_qt_t;
- 
-     sys->mi = p_intf->p_sys->p_mi;
-+    sys->orphaned = false;
-     p_wnd->sys = (vout_window_sys_t *)sys;
-     msg_Dbg( p_wnd, "requesting video window..." );
- 
-@@ -785,6 +788,8 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
- #ifdef QT5_HAS_X11
-     if (QX11Info::isPlatformX11())
-     {
-+        QMutexLocker locker2(&sys->lock);
-+
-         XReparentWindow(sys->dpy, xid, p_wnd->handle.xid, 0, 0);
-         XMapWindow(sys->dpy, xid);
-         XSync(sys->dpy, True);
-@@ -824,6 +829,26 @@ static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args )
-     return sys->mi->controlVideo(i_query, args);
- }
- 
-+void WindowReleased(vout_window_t *wnd)
-+{
-+    vout_window_qt_t *sys = (vout_window_qt_t *)wnd->sys;
-+    QMutexLocker locker(&sys->lock);
-+
-+    msg_Warn(wnd, "orphaned video window");
-+    sys->orphaned = true;
-+#if defined (QT5_HAS_X11)
-+    if (QX11Info::isPlatformX11())
-+    {   /* In the unlikely event that WindowOpen() has not yet reparented the
-+         * window, WindowOpen() will skip reparenting. Then this call will be
-+         * a no-op.
-+         */
-+        XReparentWindow(sys->dpy, wnd->handle.xid,
-+                        RootWindow(sys->dpy, DefaultScreen(sys->dpy)), 0, 0);
-+        XSync(sys->dpy, True);
-+    }
-+#endif
-+}
-+
- static void WindowClose( vout_window_t *p_wnd )
- {
-     vout_window_qt_t *sys = (vout_window_qt_t *)p_wnd->sys;
diff -Nru vlc-3.0.12/debian/patches/series vlc-3.0.16/debian/patches/series
--- vlc-3.0.12/debian/patches/series	2021-03-09 17:30:13.000000000 +0100
+++ vlc-3.0.16/debian/patches/series	2021-06-17 23:52:00.000000000 +0200
@@ -1,6 +1,3 @@
 0001-configure-fix-linking-on-RISC-V-ISA.patch
 0002-Revert-configure-Require-libmodplug-0.8.9.patch
 0003-Do-not-generate-cache-during-build.patch
-0004-qt-add-a-private-structure-for-window-provider.patch
-0005-qt-create-another-indirection-X11-window.patch
-0006-qt-reparent-video-window-to-root-whence-UI-closes.patch
diff -Nru vlc-3.0.12/include/vlc_codecs.h vlc-3.0.16/include/vlc_codecs.h
--- vlc-3.0.12/include/vlc_codecs.h	2017-11-24 16:29:17.000000000 +0100
+++ vlc-3.0.16/include/vlc_codecs.h	2021-06-07 11:06:03.000000000 +0200
@@ -2,7 +2,7 @@
  * vlc_codecs.h: codec related structures needed by the demuxers and decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VLC authors and VideoLAN
- * $Id: 611524b81a14fb4cf79d8bed93584399303904fd $
+ * $Id: acf98f90436ba1f62391db48e0e36cfcd22a4cf1 $
  *
  * Author: Gildas Bazin <gbazin@videolan.org>
  *
@@ -238,10 +238,12 @@
 #define WAVE_FORMAT_AAC_ADTS            0x1600 /* AAC/ADTS */
 #define WAVE_FORMAT_AAC_2               0x1601 /* Other AAC */
 #define WAVE_FORMAT_AAC_LATM            0x1602 /* AAC/LATM */
-#define WAVE_FORMAT_HEAAC               0x1610
+#define WAVE_FORMAT_HEAAC               0x1610 /* Raw AAC or ADTS */
 
 #define WAVE_FORMAT_A52                 0x2000 /* a52 */
 #define WAVE_FORMAT_DTS                 0x2001 /* DTS */
+#define WAVE_FORMAT_ALAC                0x6c61
+#define WAVE_FORMAT_OPUS                0x704f
 #define WAVE_FORMAT_AVCODEC_AAC         0x706D
 #define WAVE_FORMAT_DIVIO_AAC           0x4143 /* Divio's AAC */
 
@@ -362,6 +364,8 @@
     { WAVE_FORMAT_AAC_3,            VLC_CODEC_MP4A,                   "MPEG-4 Audio" },
     { WAVE_FORMAT_AAC_LATM,         VLC_CODEC_MP4A,                   "MPEG-4 LATM Audio" },
     { WAVE_FORMAT_HEAAC,            VLC_CODEC_MP4A,                   "MPEG-4 Audio" },
+    { WAVE_FORMAT_ALAC,             VLC_CODEC_ALAC,                   "Apple Lossless" },
+    { WAVE_FORMAT_OPUS,             VLC_CODEC_OPUS,                   "Opus Audio" },
     { WAVE_FORMAT_AVCODEC_AAC,      VLC_CODEC_MP4A,                   "MPEG-4 Audio" },
     { WAVE_FORMAT_AAC_MS,           VLC_CODEC_MP4A,                   "MPEG-4 Audio" },
     { WAVE_FORMAT_VORBIS,           VLC_CODEC_VORBIS,                 "Vorbis Audio" },
diff -Nru vlc-3.0.12/Makefile.am vlc-3.0.16/Makefile.am
--- vlc-3.0.12/Makefile.am	2020-10-24 20:21:13.000000000 +0200
+++ vlc-3.0.16/Makefile.am	2021-04-05 12:26:11.000000000 +0200
@@ -50,7 +50,7 @@
 ChangeLog: Makefile.am
 	rm -f -- "$@"
 	cd doc && $(MAKE) $(AM_MAKEFLAGS) changelogs
-	$(LN_S) -f doc/ChangeLog-2015 "$@"
+	$(LN_S) -f doc/ChangeLog-2021 "$@"
 
 
 ###############################################################################
diff -Nru vlc-3.0.12/modules/access/dcp/dcp.cpp vlc-3.0.16/modules/access/dcp/dcp.cpp
--- vlc-3.0.12/modules/access/dcp/dcp.cpp	2017-12-22 20:04:05.000000000 +0100
+++ vlc-3.0.16/modules/access/dcp/dcp.cpp	2021-06-13 11:32:34.000000000 +0200
@@ -76,11 +76,11 @@
 vlc_module_begin()
     set_shortname( N_( "DCP" ) )
     add_shortcut( "dcp" )
-    add_loadfile( "kdm", "", KDM_HELP_TEXT, KDM_HELP_LONG_TEXT, false )
     set_description( N_( "Digital Cinema Package module" ) )
     set_capability( "access_demux", 0 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_ACCESS )
+    add_loadfile( "kdm", "", KDM_HELP_TEXT, KDM_HELP_LONG_TEXT, false )
     set_callbacks( Open, Close )
 vlc_module_end()
 
diff -Nru vlc-3.0.12/modules/access/dvdnav.c vlc-3.0.16/modules/access/dvdnav.c
--- vlc-3.0.12/modules/access/dvdnav.c	2020-05-15 12:41:12.000000000 +0200
+++ vlc-3.0.16/modules/access/dvdnav.c	2021-06-09 17:27:37.000000000 +0200
@@ -2,7 +2,7 @@
  * dvdnav.c: DVD module using the dvdnav library.
  *****************************************************************************
  * Copyright (C) 2004-2009 VLC authors and VideoLAN
- * $Id: 89fb66f11eb1189ef4612d87cd3b2ea0bd6357ee $
+ * $Id: 69abe50c8c08955114c2baae4ed1ccd453db5887 $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -371,7 +371,14 @@
         goto bailout;
 
     /* Open dvdnav */
+#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2)
+    /* In libdvdread prior to 6.1.2, UTF8 is not supported for windows and
+     * requires a prior conversion.
+     * For non win32/os2 platforms, this is just a no-op */
     psz_path = ToLocale( psz_file );
+#else
+    psz_path = psz_file;
+#endif
 #if DVDNAV_VERSION >= 60100
     dvdnav_logger_cb cbs;
     cbs.pf_log = DvdNavLog;
@@ -390,8 +397,10 @@
 
 bailout:
     free( psz_file );
+#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2)
     if( psz_path )
         LocaleFree( psz_path );
+#endif
     return i_ret;
 }
 
diff -Nru vlc-3.0.12/modules/access/dvdread.c vlc-3.0.16/modules/access/dvdread.c
--- vlc-3.0.12/modules/access/dvdread.c	2020-05-15 12:41:12.000000000 +0200
+++ vlc-3.0.16/modules/access/dvdread.c	2021-06-09 17:27:37.000000000 +0200
@@ -2,7 +2,7 @@
  * dvdread.c : DvdRead input module for vlc
  *****************************************************************************
  * Copyright (C) 2001-2006 VLC authors and VideoLAN
- * $Id: e75bef5986e987657ff554718d43f16bab440141 $
+ * $Id: 749cbd47e00a1da57c4277187a9fcab03a217867 $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Gildas Bazin <gbazin@videolan.org>
@@ -212,7 +212,14 @@
     }
 
     /* Open dvdread */
+#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2)
+    /* In libdvdread prior to 6.1.2, UTF8 is not supported for windows and
+     * requires a prior conversion.
+     * For non win32/os2 platforms, this is just a no-op */
     const char *psz_path = ToLocale( psz_file );
+#else
+    const char *psz_path = psz_file;
+#endif
 #if DVDREAD_VERSION >= DVDREAD_VERSION_CODE(6, 1, 0)
     dvd_logger_cb cbs;
     cbs.pf_log = DvdReadLog;
@@ -220,7 +227,9 @@
 #else
     dvd_reader_t *p_dvdread = DVDOpen( psz_path );
 #endif
+#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2)
     LocaleFree( psz_path );
+#endif
     if( p_dvdread == NULL )
     {
         msg_Err( p_demux, "DVDRead cannot open source: %s", psz_file );
diff -Nru vlc-3.0.12/modules/access/ftp.c vlc-3.0.16/modules/access/ftp.c
--- vlc-3.0.12/modules/access/ftp.c	2021-01-17 21:31:01.000000000 +0100
+++ vlc-3.0.16/modules/access/ftp.c	2021-06-16 07:37:33.000000000 +0200
@@ -3,7 +3,7 @@
  *****************************************************************************
  * Copyright (C) 2001-2006 VLC authors and VideoLAN
  * Copyright © 2006 Rémi Denis-Courmont
- * $Id: 0aea13ac95979c931a6cb13676ca9681fc5da2aa $
+ * $Id: 3d79bc68a2428379914f18c708ba03727ab038a3 $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr> - original code
  *          Rémi Denis-Courmont - EPSV support
@@ -86,7 +86,7 @@
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_ACCESS )
     add_string( "ftp-user", NULL, USER_TEXT, USER_LONGTEXT, false )
-    add_string( "ftp-pwd", NULL, PASS_TEXT, PASS_LONGTEXT, false )
+    add_password( "ftp-pwd", NULL, PASS_TEXT, PASS_LONGTEXT, false )
     add_string( "ftp-account", "anonymous", ACCOUNT_TEXT,
                 ACCOUNT_LONGTEXT, false )
     add_shortcut( "ftp", "ftps", "ftpes" )
diff -Nru vlc-3.0.12/modules/access/rist.c vlc-3.0.16/modules/access/rist.c
--- vlc-3.0.12/modules/access/rist.c	2021-01-17 21:31:01.000000000 +0100
+++ vlc-3.0.16/modules/access/rist.c	2021-04-18 15:17:50.000000000 +0200
@@ -1144,11 +1144,11 @@
     add_integer( "nack-type", NACK_FMT_RANGE,
             N_("RIST nack type, 0 = range, 1 = bitmask. Default is range"), NULL, true )
         change_integer_list( nack_type, nack_type_names )
-    add_bool( "disable-nacks", false, "Disable NACK output packets",
-        "Use this to disable packet recovery", true )
-    add_bool( "mcast-blind-nacks", false, "Do not check for a valid rtcp message from the encoder",
-        "Send nack messages even when we have not confirmed that the encoder is on our local " \
-        "network.", true )
+    add_bool( "disable-nacks", false, N_("Disable NACK output packets"),
+        N_("Use this to disable packet recovery"), true )
+    add_bool( "mcast-blind-nacks", false, N_("Do not check for a valid rtcp message from the encoder"),
+        N_("Send nack messages even when we have not confirmed that the encoder is on our local " \
+        "network."), true )
 
     set_capability( "access", 0 )
     add_shortcut( "rist", "tr06" )
diff -Nru vlc-3.0.12/modules/access/smb2.c vlc-3.0.16/modules/access/smb2.c
--- vlc-3.0.12/modules/access/smb2.c	2020-11-09 15:42:20.000000000 +0100
+++ vlc-3.0.16/modules/access/smb2.c	2021-05-09 12:14:47.000000000 +0200
@@ -50,10 +50,10 @@
 #ifdef HAVE_DSM
 # include <bdsm/netbios_ns.h>
 # include <bdsm/netbios_defs.h>
+#endif
 
-# ifdef HAVE_ARPA_INET_H
-#  include <arpa/inet.h>
-# endif
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
 #endif
 
 #include "smb_common.h"
@@ -133,6 +133,34 @@
 
 #define VLC_SMB2_STATUS_DENIED(x) (x == -ECONNREFUSED || x == -EACCES)
 
+#if defined (__ELF__) || defined (__MACH__) /* weak support */
+/* There is no way to know if libsmb2 has these new symbols and we don't want
+ * to increase the version requirement on VLC 3.0, therefore implement a weak
+ * compat version. */
+const t_socket *
+smb2_get_fds(struct smb2_context *smb2, size_t *fd_count, int *timeout);
+int
+smb2_service_fd(struct smb2_context *smb2, int fd, int revents);
+
+__attribute__((weak)) const t_socket *
+smb2_get_fds(struct smb2_context *smb2, size_t *fd_count, int *timeout)
+{
+    (void) timeout;
+    static thread_local t_socket fd;
+
+    *fd_count = 1;
+    fd = smb2_get_fd(smb2);
+    return &fd;
+}
+
+__attribute__((weak)) int
+smb2_service_fd(struct smb2_context *smb2, int fd, int revents)
+{
+    (void) fd;
+    return smb2_service(smb2, revents);
+}
+#endif
+
 static int
 vlc_smb2_mainloop(stream_t *access, bool teardown)
 {
@@ -161,12 +189,21 @@
     sys->res_done = false;
     while (sys->error_status == 0 && !sys->res_done)
     {
-        struct pollfd p_fds[1];
-        int ret;
-        p_fds[0].fd = smb2_get_fd(sys->smb2);
-        p_fds[0].events = smb2_which_events(sys->smb2);
+        int ret, smb2_timeout;
+        size_t fd_count;
+        const t_socket *fds = smb2_get_fds(sys->smb2, &fd_count, &smb2_timeout);
+        int events = smb2_which_events(sys->smb2);
+
+        struct pollfd p_fds[fd_count];
+        for (size_t i = 0; i < fd_count; ++i)
+        {
+            p_fds[i].events = events;
+            p_fds[i].fd = fds[i];
+        }
+        if (smb2_timeout != -1)
+            timeout = smb2_timeout;
 
-        if (p_fds[0].fd == -1 || (ret = poll_func(p_fds, 1, timeout)) < 0)
+        if (fds == NULL || (ret = poll_func(p_fds, fd_count, timeout)) < 0)
         {
             if (errno == EINTR)
             {
@@ -189,10 +226,21 @@
             }
         }
         else if (ret == 0)
-            sys->error_status = -ETIMEDOUT;
-        else if (ret > 0 && p_fds[0].revents
-             && smb2_service(sys->smb2, p_fds[0].revents) < 0)
-            VLC_SMB2_SET_ERROR(access, "smb2_service", 1);
+        {
+            if (teardown)
+                sys->error_status = -ETIMEDOUT;
+            else if (smb2_service_fd(sys->smb2, -1, 0) < 0)
+                VLC_SMB2_SET_ERROR(access, "smb2_service", 1);
+        }
+        else
+        {
+            for (size_t i = 0; i < fd_count; ++i)
+            {
+                if (p_fds[i].revents
+                 && smb2_service_fd(sys->smb2, p_fds[i].fd, p_fds[i].revents) < 0)
+                    VLC_SMB2_SET_ERROR(access, "smb2_service", 1);
+            }
+        }
     }
 
     int ret = sys->error_status == 0 ? 0 : -1;
@@ -483,6 +531,38 @@
     sys->share_enum = data;
 }
 
+static void
+vlc_smb2_print_addr(stream_t *access)
+{
+    struct access_sys *sys = access->p_sys;
+
+    struct sockaddr_storage addr;
+    if (getsockname(smb2_get_fd(sys->smb2), (struct sockaddr *)&addr,
+                    &(socklen_t){ sizeof(addr) }) != 0)
+        return;
+
+    void *sin_addr;
+    switch (addr.ss_family)
+    {
+        case AF_INET6:
+            sin_addr = &((struct sockaddr_in6 *)&addr)->sin6_addr;
+            break;
+        case AF_INET:
+            sin_addr = &((struct sockaddr_in *)&addr)->sin_addr;
+            break;
+        default:
+            return;
+    }
+    char ip[INET6_ADDRSTRLEN];
+    if (inet_ntop(addr.ss_family, sin_addr, ip, sizeof(ip)) == NULL)
+        return;
+
+    if (strcmp(ip, sys->encoded_url.psz_host) == 0)
+        return;
+
+    msg_Dbg(access, "%s: connected from %s\n", sys->encoded_url.psz_host, ip);
+}
+
 static int
 vlc_smb2_open_share(stream_t *access, const char *url,
                     const vlc_credential *credential)
@@ -532,6 +612,8 @@
         goto error;
     sys->smb2_connected = true;
 
+    vlc_smb2_print_addr(access);
+
     int ret;
     if (do_enum)
         ret = smb2_share_enum_async(sys->smb2, smb2_share_enum_cb, access);
@@ -613,7 +695,7 @@
     uint32_t ip4_addr;
     if (netbios_ns_resolve(ns, host, NETBIOS_FILESERVER, &ip4_addr) == 0)
     {
-        char ip[] = "xxx.xxx.xxx.xxx";
+        char ip[INET_ADDRSTRLEN];
         if (inet_ntop(AF_INET, &ip4_addr, ip, sizeof(ip)))
             out_host = strdup(ip);
     }
@@ -645,7 +727,6 @@
 
     char *resolved_host = vlc_smb2_resolve(access, sys->encoded_url.psz_host,
                                            sys->encoded_url.i_port);
-    const char *host;
 
     /* smb2_* functions need a decoded url. Re compose the url from the
      * modified sys->encoded_url (with the resolved host). */
@@ -655,12 +736,10 @@
         vlc_url_t resolved_url = sys->encoded_url;
         resolved_url.psz_host = resolved_host;
         url = vlc_uri_compose(&resolved_url);
-        host = resolved_host;
     }
     else
     {
         url = vlc_uri_compose(&sys->encoded_url);
-        host = sys->encoded_url.psz_host;
     }
     if (!vlc_uri_decode(url))
     {
@@ -685,7 +764,7 @@
         && (!sys->error_status || VLC_SMB2_STATUS_DENIED(sys->error_status))
         && vlc_credential_get(&credential, access, "smb-user", "smb-pwd",
                               SMB_LOGIN_DIALOG_TITLE, SMB_LOGIN_DIALOG_TEXT,
-                              host))
+                              sys->encoded_url.psz_host))
     {
         sys->error_status = 0;
         ret = vlc_smb2_open_share(access, url, &credential);
diff -Nru vlc-3.0.12/modules/audio_output/file.c vlc-3.0.16/modules/audio_output/file.c
--- vlc-3.0.12/modules/audio_output/file.c	2020-01-13 17:36:32.000000000 +0100
+++ vlc-3.0.16/modules/audio_output/file.c	2021-06-16 09:50:01.000000000 +0200
@@ -2,7 +2,7 @@
  * file.c : audio output which writes the samples to a file
  *****************************************************************************
  * Copyright (C) 2002 VLC authors and VideoLAN
- * $Id: fd811e9c238fc44530932e19fc05b6f581c6a7d6 $
+ * $Id: 353c2f0095b2e1c19034172b0c40998421ec3d4c $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -181,7 +181,7 @@
     i_format_list_size = (int)ARRAY_SIZE(format_list);
     for (i = 0; i < i_format_list_size; i++)
     {
-        if ( !strncmp( format_list[i], psz_format, strlen(format_list[i]) ) )
+        if ( !strcmp( format_list[i], psz_format ) )
         {
             break;
         }
diff -Nru vlc-3.0.12/modules/audio_output/sndio.c vlc-3.0.16/modules/audio_output/sndio.c
--- vlc-3.0.12/modules/audio_output/sndio.c	2017-11-24 16:29:17.000000000 +0100
+++ vlc-3.0.16/modules/audio_output/sndio.c	2021-06-07 11:25:58.000000000 +0200
@@ -208,6 +208,8 @@
 {
     aout_sys_t *sys = aout->sys;
 
+    aout->volume_set = NULL;
+    aout->mute_set = NULL;
     sio_close (sys->hdl);
 }
 
diff -Nru vlc-3.0.12/modules/codec/daala.c vlc-3.0.16/modules/codec/daala.c
--- vlc-3.0.12/modules/codec/daala.c	2019-08-19 08:38:03.000000000 +0200
+++ vlc-3.0.16/modules/codec/daala.c	2021-06-13 11:32:34.000000000 +0200
@@ -147,8 +147,10 @@
     add_string( ENC_CFG_PREFIX "chroma-fmt", "420", ENC_CHROMAFMT_TEXT,
                 ENC_CHROMAFMT_LONGTEXT, false )
     change_string_list( enc_chromafmt_list, enc_chromafmt_list_text )
+#endif
 vlc_module_end ()
 
+#ifdef ENABLE_SOUT
 static const char *const ppsz_enc_options[] = {
     "quality", "keyint", "chroma-fmt", NULL
 };
diff -Nru vlc-3.0.12/modules/codec/dav1d.c vlc-3.0.16/modules/codec/dav1d.c
--- vlc-3.0.12/modules/codec/dav1d.c	2021-01-17 21:31:01.000000000 +0100
+++ vlc-3.0.16/modules/codec/dav1d.c	2021-04-27 15:18:39.000000000 +0200
@@ -273,6 +273,7 @@
 static int OpenDecoder(vlc_object_t *p_this)
 {
     decoder_t *dec = (decoder_t *)p_this;
+    unsigned i_core_count = vlc_GetCPUCount();
 
     if (dec->fmt_in.i_codec != VLC_CODEC_AV1)
         return VLC_EGENERIC;
@@ -284,10 +285,13 @@
     dav1d_default_settings(&p_sys->s);
     p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles");
     if (p_sys->s.n_tile_threads == 0)
-        p_sys->s.n_tile_threads = VLC_CLIP(vlc_GetCPUCount(), 1, 4);
+        p_sys->s.n_tile_threads =
+            (i_core_count > 4) ? 4 :
+            (i_core_count > 1) ? i_core_count :
+            1;
     p_sys->s.n_frame_threads = var_InheritInteger(p_this, "dav1d-thread-frames");
     if (p_sys->s.n_frame_threads == 0)
-        p_sys->s.n_frame_threads = __MAX(1, vlc_GetCPUCount());
+        p_sys->s.n_frame_threads = (i_core_count < 16) ? i_core_count : 16;
     p_sys->s.allocator.cookie = dec;
     p_sys->s.allocator.alloc_picture_callback = NewPicture;
     p_sys->s.allocator.release_picture_callback = FreePicture;
diff -Nru vlc-3.0.12/modules/codec/fluidsynth.c vlc-3.0.16/modules/codec/fluidsynth.c
--- vlc-3.0.12/modules/codec/fluidsynth.c	2017-12-06 02:59:00.000000000 +0100
+++ vlc-3.0.16/modules/codec/fluidsynth.c	2021-03-20 19:20:19.000000000 +0100
@@ -2,7 +2,7 @@
  * fluidsynth.c: Software MIDI synthesizer using libfluidsynth
  *****************************************************************************
  * Copyright © 2007 Rémi Denis-Courmont
- * $Id: f461f3fd14716f2147a200ba614c53ae6c2712f4 $
+ * $Id: 1212603281abf50bdfc3d5c9eded42eeb4f9dbdd $
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published by
@@ -129,7 +129,10 @@
     {
         glob_t gl;
 
-        glob ("/usr/share/sounds/sf2/*.sf2", GLOB_NOESCAPE, NULL, &gl);
+        glob("/usr/share/sounds/sf2/*.sf2", GLOB_NOESCAPE, NULL, &gl);
+        glob("/usr/share/soundfonts/*.sf2", GLOB_NOESCAPE | GLOB_APPEND, NULL,
+             &gl);
+
         for (size_t i = 0; i < gl.gl_pathc; i++)
         {
             const char *path = gl.gl_pathv[i];
diff -Nru vlc-3.0.12/modules/codec/kate.c vlc-3.0.16/modules/codec/kate.c
--- vlc-3.0.12/modules/codec/kate.c	2019-08-19 08:38:03.000000000 +0200
+++ vlc-3.0.16/modules/codec/kate.c	2021-04-27 15:18:39.000000000 +0200
@@ -2,7 +2,7 @@
  * kate.c : a decoder for the kate bitstream format
  *****************************************************************************
  * Copyright (C) 2000-2008 VLC authors and VideoLAN
- * $Id: 5f7784791d8edb8d304c9c3114e9123cf342f104 $
+ * $Id: cbcb0090c44de7bf44125f22b1bf75a763ee2134 $
  *
  * Authors: Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com>
  *
@@ -1169,7 +1169,6 @@
         CreateKatePalette( fmt.p_palette, ev->palette );
 
         p_bitmap_region = subpicture_region_New( &fmt );
-        video_format_Clean( &fmt );
         if( !p_bitmap_region )
         {
             msg_Err( p_dec, "cannot allocate SPU region" );
diff -Nru vlc-3.0.12/modules/codec/libass.c vlc-3.0.16/modules/codec/libass.c
--- vlc-3.0.12/modules/codec/libass.c	2017-12-14 00:42:06.000000000 +0100
+++ vlc-3.0.16/modules/codec/libass.c	2021-03-20 19:20:19.000000000 +0100
@@ -2,7 +2,7 @@
  * SSA/ASS subtitle decoder using libass.
  *****************************************************************************
  * Copyright (C) 2008-2009 VLC authors and VideoLAN
- * $Id: f743fbb616da1908bec901966861509fe7140f58 $
+ * $Id: ac03830e3ca7eecec3d6596c4771d34ae6799549 $
  *
  * Authors: Laurent Aimar <fenrir@videolan.org>
  *
@@ -56,6 +56,8 @@
 static int  Create ( vlc_object_t * );
 static void Destroy( vlc_object_t * );
 
+#define TEXT_SSA_FONTSDIR   N_("Additional fonts directory")
+
 vlc_module_begin ()
     set_shortname( N_("Subtitles (advanced)"))
     set_description( N_("Subtitle renderers using libass") )
@@ -63,6 +65,7 @@
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( Create, Destroy )
+    add_string("ssa-fontsdir", NULL, TEXT_SSA_FONTSDIR, NULL, false)
 vlc_module_end ()
 
 /*****************************************************************************
@@ -75,12 +78,14 @@
 struct decoder_sys_t
 {
     mtime_t        i_max_stop;
+    int            i_scale;
 
     /* The following fields of decoder_sys_t are shared between decoder and spu units */
     vlc_mutex_t    lock;
     int            i_refcount;
 
     /* */
+    vlc_object_t *p_callbackobj;
     ASS_Library    *p_library;
     ASS_Renderer   *p_renderer;
     video_format_t fmt;
@@ -123,6 +128,19 @@
 static int BuildRegions( rectangle_t *p_region, int i_max_region, ASS_Image *p_img_list, int i_width, int i_height );
 static void RegionDraw( subpicture_region_t *p_region, ASS_Image *p_img );
 
+static int ScalingCallback (vlc_object_t *obj, const char *var,
+                            vlc_value_t old, vlc_value_t cur, void *data)
+{
+    decoder_sys_t *p_sys = data;
+    VLC_UNUSED(obj);
+    VLC_UNUSED(var);
+    VLC_UNUSED(old);
+    vlc_mutex_lock(&p_sys->lock);
+    p_sys->i_scale = cur.i_int;
+    vlc_mutex_unlock(&p_sys->lock);
+    return VLC_SUCCESS;
+}
+
 //#define DEBUG_REGION
 
 /*****************************************************************************
@@ -148,6 +166,7 @@
     p_sys->i_refcount = 1;
     memset( &p_sys->fmt, 0, sizeof(p_sys->fmt) );
     p_sys->i_max_stop = VLC_TS_INVALID;
+    p_sys->i_scale = var_InheritInteger( p_dec, "sub-text-scale" );
     p_sys->p_library  = NULL;
     p_sys->p_renderer = NULL;
     p_sys->p_track    = NULL;
@@ -197,6 +216,13 @@
     }
     free( pp_attachments );
 
+    char *psz_fontsdir = var_InheritString( p_dec, "ssa-fontsdir" );
+    if( psz_fontsdir )
+    {
+        ass_set_fonts_dir( p_library, psz_fontsdir );
+        free( psz_fontsdir );
+    }
+
     ass_set_extract_fonts( p_library, true );
     ass_set_style_overrides( p_library, NULL );
 
@@ -272,6 +298,18 @@
     }
     ass_process_codec_private( p_track, p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra );
 
+    vlc_value_t val;
+    for ( vlc_object_t *obj = p_dec; obj; obj = obj->obj.parent )
+    {
+        if( var_GetChecked( obj,  "sub-text-scale" ,
+                            VLC_VAR_INTEGER, &val ) == VLC_SUCCESS )
+        {
+            var_AddCallback( obj, "sub-text-scale", ScalingCallback, p_sys );
+            p_sys->p_callbackobj = obj;
+            break;
+        }
+    }
+
     p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
 
     return VLC_SUCCESS;
@@ -304,6 +342,11 @@
         return;
     }
     vlc_mutex_unlock( &p_sys->lock );
+
+    if( p_sys->p_callbackobj )
+        var_DelCallback( p_sys->p_callbackobj, "sub-text-scale",
+                         ScalingCallback, p_sys );
+
     vlc_mutex_destroy( &p_sys->lock );
 
     if( p_sys->p_track )
@@ -436,6 +479,8 @@
         p_sys->fmt = fmt;
     }
 
+    ass_set_font_scale( p_sys->p_renderer, p_sys->i_scale / 100.0 );
+
     /* */
     const mtime_t i_stream_date = p_subpic->updater.p_sys->i_pts + (i_ts - p_subpic->i_start);
     int i_changed;
diff -Nru vlc-3.0.12/modules/codec/omxil/mediacodec.c vlc-3.0.16/modules/codec/omxil/mediacodec.c
--- vlc-3.0.12/modules/codec/omxil/mediacodec.c	2020-01-13 17:36:32.000000000 +0100
+++ vlc-3.0.16/modules/codec/omxil/mediacodec.c	2021-03-20 19:20:19.000000000 +0100
@@ -453,10 +453,10 @@
 
     /* If MediaCodec can handle the rotation, reset the orientation to
      * Normal in order to ask the vout not to rotate. */
+    p_dec->fmt_out.video.orientation = p_dec->fmt_in.video.orientation;
     if (p_sys->video.i_angle != 0)
     {
         assert(p_dec->fmt_out.i_codec == VLC_CODEC_ANDROID_OPAQUE);
-        p_dec->fmt_out.video.orientation = p_dec->fmt_in.video.orientation;
         video_format_TransformTo(&p_dec->fmt_out.video, ORIENT_NORMAL);
     }
 
diff -Nru vlc-3.0.12/modules/codec/omxil/OMX_Types.h vlc-3.0.16/modules/codec/omxil/OMX_Types.h
--- vlc-3.0.12/modules/codec/omxil/OMX_Types.h	2017-11-24 16:29:17.000000000 +0100
+++ vlc-3.0.16/modules/codec/omxil/OMX_Types.h	2021-03-20 19:20:19.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008 The Khronos Group Inc. 
+ * Copyright (c) 2016 The Khronos Group Inc.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files (the
@@ -31,6 +31,8 @@
 #ifndef OMX_Types_h
 #define OMX_Types_h
 
+#include <stdint.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -130,22 +132,22 @@
   */ 
 
 /** OMX_U8 is an 8 bit unsigned quantity that is byte aligned */
-typedef unsigned char OMX_U8;
+typedef uint8_t OMX_U8;
 
 /** OMX_S8 is an 8 bit signed quantity that is byte aligned */
-typedef signed char OMX_S8;
+typedef int8_t OMX_S8;
 
 /** OMX_U16 is a 16 bit unsigned quantity that is 16 bit word aligned */
-typedef unsigned short OMX_U16;
+typedef uint16_t OMX_U16;
 
 /** OMX_S16 is a 16 bit signed quantity that is 16 bit word aligned */
-typedef signed short OMX_S16;
+typedef int16_t OMX_S16;
 
 /** OMX_U32 is a 32 bit unsigned quantity that is 32 bit word aligned */
-typedef unsigned long OMX_U32;
+typedef uint32_t OMX_U32;
 
 /** OMX_S32 is a 32 bit signed quantity that is 32 bit word aligned */
-typedef signed long OMX_S32;
+typedef int32_t OMX_S32;
 
 
 /* Users with compilers that cannot accept the "long long" designation should
@@ -173,10 +175,10 @@
 #else /* _WIN32 */
 
 /** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */
-typedef unsigned long long OMX_U64;
+typedef uint64_t OMX_U64;
 
 /** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */
-typedef signed long long OMX_S64;
+typedef int64_t OMX_S64;
 
 #endif /* _WIN32 */
 #endif
diff -Nru vlc-3.0.12/modules/codec/webvtt/subsvtt.c vlc-3.0.16/modules/codec/webvtt/subsvtt.c
--- vlc-3.0.12/modules/codec/webvtt/subsvtt.c	2020-07-28 16:21:50.000000000 +0200
+++ vlc-3.0.16/modules/codec/webvtt/subsvtt.c	2021-03-26 13:45:59.000000000 +0100
@@ -122,8 +122,8 @@
 {
     WEBVTT_NODE_BASE_MEMBERS
     char *psz_id;
-    mtime_t i_start;
-    mtime_t i_stop;
+    mtime_t i_nzstart;
+    mtime_t i_nzstop;
     webvtt_cue_settings_t settings;
     unsigned i_lines;
     text_style_t *p_cssstyle;
@@ -139,7 +139,7 @@
 typedef struct
 {
     WEBVTT_NODE_BASE_MEMBERS
-    mtime_t i_start;
+    mtime_t i_nzstart;
     char *psz_tag;
     char *psz_attrs;
     text_style_t *p_cssstyle;
@@ -508,7 +508,7 @@
     webvtt_dom_tag_t *p_node = calloc( 1, sizeof(*p_node) );
     if( p_node )
     {
-        p_node->i_start = -1;
+        p_node->i_nzstart = -1;
         p_node->type = NODE_TAG;
         p_node->p_parent = p_parent;
     }
@@ -557,9 +557,9 @@
     {
         if( p_node->type == NODE_TAG )
         {
-            mtime_t i_start = ((const webvtt_dom_tag_t *) p_node)->i_start;
-            if( i_start > -1 && !b_end )
-                return i_start;
+            mtime_t i_nzstart = ((const webvtt_dom_tag_t *) p_node)->i_nzstart;
+            if( i_nzstart > -1 && !b_end )
+                return i_nzstart;
         }
         else if( p_node->type == NODE_CUE )
         {
@@ -567,8 +567,8 @@
         }
     }
     if( p_node )
-        return b_end ? ((const webvtt_dom_cue_t *) p_node)->i_stop:
-                       ((const webvtt_dom_cue_t *) p_node)->i_start;
+        return b_end ? ((const webvtt_dom_cue_t *) p_node)->i_nzstop:
+                       ((const webvtt_dom_cue_t *) p_node)->i_nzstart;
     return VLC_TS_INVALID;
 }
 
@@ -620,12 +620,12 @@
 }
 
 static bool webvtt_domnode_Match_PseudoClass( const webvtt_dom_node_t *p_node, const char *psz,
-                                              mtime_t i_playbacktime )
+                                              mtime_t i_nzplaybacktime )
 {
     if( !strcmp(psz, "past") || !strcmp(psz, "future") )
     {
-        mtime_t i_start = webvtt_domnode_GetPlaybackTime( p_node, false );
-        return ( *psz == 'p' ) ? i_start < i_playbacktime : i_start > i_playbacktime;
+        mtime_t i_nzstart = webvtt_domnode_GetPlaybackTime( p_node, false );
+        return ( *psz == 'p' ) ? i_nzstart < i_nzplaybacktime : i_nzstart > i_nzplaybacktime;
     }
     return false;
 }
@@ -717,7 +717,7 @@
 }
 
 static bool webvtt_domnode_MatchType( decoder_t *p_dec, const webvtt_dom_node_t *p_node,
-                                      const vlc_css_selector_t *p_sel, mtime_t i_playbacktime )
+                                      const vlc_css_selector_t *p_sel, mtime_t i_nzplaybacktime )
 {
     VLC_UNUSED(p_dec);
     switch( p_sel->type )
@@ -726,7 +726,7 @@
             return webvtt_domnode_Match_Tag( p_node, p_sel->psz_name );
         case SELECTOR_PSEUDOCLASS:
             return webvtt_domnode_Match_PseudoClass( p_node, p_sel->psz_name,
-                                                     i_playbacktime );
+                                                     i_nzplaybacktime );
         case SELECTOR_PSEUDOELEMENT:
             return webvtt_domnode_Match_PseudoElement( p_node, p_sel->psz_name );
         case SPECIFIER_ID:
@@ -787,24 +787,24 @@
 #ifdef HAVE_CSS
 static void webvtt_domnode_SelectNodesInTree( decoder_t *p_dec, const vlc_css_selector_t *p_sel,
                                               const webvtt_dom_node_t *p_tree, int i_max_depth,
-                                              mtime_t i_playbacktime, vlc_array_t *p_results );
+                                              mtime_t i_nzplaybacktime, vlc_array_t *p_results );
 
 static void webvtt_domnode_SelectChildNodesInTree( decoder_t *p_dec, const vlc_css_selector_t *p_sel,
                                                    const webvtt_dom_node_t *p_root, int i_max_depth,
-                                                   mtime_t i_playbacktime, vlc_array_t *p_results )
+                                                   mtime_t i_nzplaybacktime, vlc_array_t *p_results )
 {
     const webvtt_dom_node_t *p_child = webvtt_domnode_getFirstChild( p_root );
     if( i_max_depth > 0 )
     {
         for( ; p_child; p_child = p_child->p_next )
             webvtt_domnode_SelectNodesInTree( p_dec, p_sel, p_child, i_max_depth - 1,
-                                              i_playbacktime, p_results );
+                                              i_nzplaybacktime, p_results );
     }
 }
 
 static void webvtt_domnode_SelectNodesBySpeficier( decoder_t *p_dec, const vlc_css_selector_t *p_spec,
                                                    const webvtt_dom_node_t *p_node,
-                                                   mtime_t i_playbacktime, vlc_array_t *p_results )
+                                                   mtime_t i_nzplaybacktime, vlc_array_t *p_results )
 {
     if( p_spec == NULL )
         return;
@@ -813,37 +813,37 @@
     {
         case RELATION_DESCENDENT:
             webvtt_domnode_SelectChildNodesInTree( p_dec, p_spec, p_node, WEBVTT_MAX_DEPTH,
-                                                   i_playbacktime, p_results );
+                                                   i_nzplaybacktime, p_results );
             break;
         case RELATION_DIRECTADJACENT:
             for( const webvtt_dom_node_t *p_adj = p_node->p_next; p_adj; p_adj = p_adj->p_next )
                 webvtt_domnode_SelectChildNodesInTree( p_dec, p_spec, p_adj, 1,
-                                                       i_playbacktime, p_results );
+                                                       i_nzplaybacktime, p_results );
             break;
         case RELATION_INDIRECTADJACENT:
             for( const webvtt_dom_node_t *p_adj = webvtt_domnode_getFirstChild( p_node->p_parent );
                                           p_adj && p_adj != p_node; p_adj = p_adj->p_next )
                 webvtt_domnode_SelectChildNodesInTree( p_dec, p_spec, p_adj, 1,
-                                                       i_playbacktime, p_results );
+                                                       i_nzplaybacktime, p_results );
             break;
         case RELATION_CHILD:
             webvtt_domnode_SelectChildNodesInTree( p_dec, p_spec, p_node, 1,
-                                                   i_playbacktime, p_results );
+                                                   i_nzplaybacktime, p_results );
             break;
         case RELATION_SELF:
             webvtt_domnode_SelectNodesInTree( p_dec, p_spec, p_node, WEBVTT_MAX_DEPTH,
-                                              i_playbacktime, p_results );
+                                              i_nzplaybacktime, p_results );
     }
 }
 
 static void webvtt_domnode_SelectNodesInTree( decoder_t *p_dec, const vlc_css_selector_t *p_sel,
                                               const webvtt_dom_node_t *p_root, int i_max_depth,
-                                              mtime_t i_playbacktime, vlc_array_t *p_results )
+                                              mtime_t i_nzplaybacktime, vlc_array_t *p_results )
 {
     if( p_root == NULL )
         return;
 
-    if( webvtt_domnode_MatchType( p_dec, p_root, p_sel, i_playbacktime ) )
+    if( webvtt_domnode_MatchType( p_dec, p_root, p_sel, i_nzplaybacktime ) )
     {
         if( p_sel->specifiers.p_first == NULL )
         {
@@ -851,16 +851,16 @@
             (void) vlc_array_append( p_results, (void *) p_root );
         }
         else webvtt_domnode_SelectNodesBySpeficier( p_dec, p_sel->specifiers.p_first, p_root,
-                                                    i_playbacktime, p_results );
+                                                    i_nzplaybacktime, p_results );
     }
 
     /* lookup other subnodes */
     webvtt_domnode_SelectChildNodesInTree( p_dec, p_sel, p_root, i_max_depth - 1,
-                                           i_playbacktime, p_results );
+                                           i_nzplaybacktime, p_results );
 }
 
 static void webvtt_domnode_SelectRuleNodes( decoder_t *p_dec, const vlc_css_rule_t *p_rule,
-                                            mtime_t i_playbacktime, vlc_array_t *p_results )
+                                            mtime_t i_nzplaybacktime, vlc_array_t *p_results )
 {
     const webvtt_dom_node_t *p_cues = p_dec->p_sys->p_root->p_child;
     for( const vlc_css_selector_t *p_sel = p_rule->p_selectors; p_sel; p_sel = p_sel->p_next )
@@ -870,7 +870,7 @@
         for( const webvtt_dom_node_t *p_node = p_cues; p_node; p_node = p_node->p_next )
         {
             webvtt_domnode_SelectNodesInTree( p_dec, p_sel, p_node, WEBVTT_MAX_DEPTH,
-                                              i_playbacktime, &tempresults );
+                                              i_nzplaybacktime, &tempresults );
         }
         for( size_t i=0; i<vlc_array_count(&tempresults); i++ )
             (void) vlc_array_append( p_results, vlc_array_item_at_index( &tempresults, i ) );
@@ -927,15 +927,15 @@
 /*****************************************************************************
  *
  *****************************************************************************/
-static webvtt_dom_cue_t * webvtt_dom_cue_New( mtime_t i_start, mtime_t i_end )
+static webvtt_dom_cue_t * webvtt_dom_cue_New( mtime_t i_nzstart, mtime_t i_end )
 {
     webvtt_dom_cue_t *p_cue = calloc( 1, sizeof(*p_cue) );
     if( p_cue )
     {
         p_cue->type = NODE_CUE;
         p_cue->psz_id = NULL;
-        p_cue->i_start = i_start;
-        p_cue->i_stop = i_end;
+        p_cue->i_nzstart = i_nzstart;
+        p_cue->i_nzstop = i_end;
         p_cue->p_child = NULL;
         p_cue->i_lines = 0;
         p_cue->p_cssstyle = NULL;
@@ -1076,7 +1076,7 @@
     p_region->p_child = NULL;
 }
 
-static void ClearCuesByTime( webvtt_dom_node_t **pp_next, mtime_t i_time )
+static void ClearCuesByTime( webvtt_dom_node_t **pp_next, mtime_t i_nztime )
 {
     while( *pp_next )
     {
@@ -1086,7 +1086,7 @@
             if( p_node->type == NODE_CUE )
             {
                 webvtt_dom_cue_t *p_cue = (webvtt_dom_cue_t *)p_node;
-                if( p_cue->i_stop <= i_time )
+                if( p_cue->i_nzstop <= i_nztime )
                 {
                     *pp_next = p_node->p_next;
                     p_node->p_next = NULL;
@@ -1097,7 +1097,7 @@
             else if( p_node->type == NODE_REGION )
             {
                 webvtt_region_t *p_region = (webvtt_region_t *) p_node;
-                ClearCuesByTime( &p_region->p_child, i_time );
+                ClearCuesByTime( &p_region->p_child, i_nztime );
             }
             pp_next = &p_node->p_next;
         }
@@ -1242,7 +1242,7 @@
                         p_node->psz_attrs = strndup( psz_attrs, psz_taglast - psz_attrs );
                     /* <hh:mm::ss:fff> time tags */
                     if( p_node->psz_attrs && isdigit(p_node->psz_attrs[0]) )
-                        (void) webvtt_scan_time( p_node->psz_attrs, &p_node->i_start );
+                        (void) webvtt_scan_time( p_node->psz_attrs, &p_node->i_nzstart );
                     *pp_append = (webvtt_dom_node_t *) p_node;
                     p_parent = (webvtt_dom_node_t *) p_node;
                     pp_append = &p_node->p_child;
@@ -1329,11 +1329,11 @@
         {
             const webvtt_dom_tag_t *p_tagnode = (const webvtt_dom_tag_t *)p_node;
 
-            if( p_tagnode->i_start > -1 )
+            if( p_tagnode->i_nzstart > -1 )
             {
                 /* Ignore other timed stylings */
                 if( i_tagtime == -1 )
-                    i_tagtime = p_tagnode->i_start;
+                    i_tagtime = p_tagnode->i_nzstart;
                 else
                     continue;
             }
@@ -1527,20 +1527,20 @@
     return ConvertNodesToSegments( p_dec, p_vars, p_cue, p_cue->p_child );
 }
 
-static text_segment_t * ConvertCuesToSegments( decoder_t *p_dec, mtime_t i_start, mtime_t i_stop,
+static text_segment_t * ConvertCuesToSegments( decoder_t *p_dec, mtime_t i_nzstart, mtime_t i_nzstop,
                                                struct render_variables_s *p_vars,
                                                const webvtt_dom_cue_t *p_cue )
 {
     text_segment_t *p_segments = NULL;
     text_segment_t **pp_append = &p_segments;
-    VLC_UNUSED(i_stop);
+    VLC_UNUSED(i_nzstop);
 
     for( ; p_cue; p_cue = (const webvtt_dom_cue_t *) p_cue->p_next )
     {
         if( p_cue->type != NODE_CUE )
             continue;
 
-        if( p_cue->i_start > i_start || p_cue->i_stop <= i_start )
+        if( p_cue->i_nzstart > i_nzstart || p_cue->i_nzstop <= i_nzstart )
             continue;
 
         text_segment_t *p_new = ConvertCueToSegments( p_dec, p_vars, p_cue );
@@ -1577,7 +1577,7 @@
 }
 
 static void GetTimedTags( const webvtt_dom_node_t *p_node,
-                           mtime_t i_start, mtime_t i_stop, vlc_array_t *p_times )
+                           mtime_t i_nzstart, mtime_t i_nzstop, vlc_array_t *p_times )
 {
     for( ; p_node; p_node = p_node->p_next )
     {
@@ -1586,14 +1586,14 @@
             case NODE_TAG:
             {
                 const webvtt_dom_tag_t *p_tag = (const webvtt_dom_tag_t *) p_node;
-                if( p_tag->i_start > -1 && p_tag->i_start >= i_start && p_tag->i_start < i_stop )
+                if( p_tag->i_nzstart > -1 && p_tag->i_nzstart >= i_nzstart && p_tag->i_nzstart < i_nzstop )
                     (void) vlc_array_append( p_times, (void *) p_tag );
-                GetTimedTags( p_tag->p_child, i_start, i_stop, p_times );
+                GetTimedTags( p_tag->p_child, i_nzstart, i_nzstop, p_times );
             } break;
             case NODE_REGION:
             case NODE_CUE:
                 GetTimedTags( webvtt_domnode_getFirstChild( p_node ),
-                              i_start, i_stop, p_times );
+                              i_nzstart, i_nzstop, p_times );
                 break;
             default:
                 break;
@@ -1634,14 +1634,14 @@
 
 #ifdef HAVE_CSS
 static void ApplyCSSRules( decoder_t *p_dec, const vlc_css_rule_t *p_rule,
-                           mtime_t i_playbacktime )
+                           mtime_t i_nzplaybacktime )
 {
     for ( ;  p_rule ; p_rule = p_rule->p_next )
     {
         vlc_array_t results;
         vlc_array_init( &results );
 
-        webvtt_domnode_SelectRuleNodes( p_dec, p_rule, i_playbacktime, &results );
+        webvtt_domnode_SelectRuleNodes( p_dec, p_rule, i_nzplaybacktime, &results );
 
         for( const vlc_css_declaration_t *p_decl = p_rule->p_declarations;
                                           p_decl; p_decl = p_decl->p_next )
@@ -1670,13 +1670,13 @@
 }
 #endif
 
-static void RenderRegions( decoder_t *p_dec, mtime_t i_start, mtime_t i_stop )
+static void RenderRegions( decoder_t *p_dec, mtime_t i_nzstart, mtime_t i_nzstop )
 {
     subpicture_t *p_spu = NULL;
     subpicture_updater_sys_region_t *p_updtregion = NULL;
 
 #ifdef HAVE_CSS
-    ApplyCSSRules( p_dec, p_dec->p_sys->p_css_rules, i_start );
+    ApplyCSSRules( p_dec, p_dec->p_sys->p_css_rules, i_nzstart );
 #endif
 
     const webvtt_dom_cue_t *p_rlcue = NULL;
@@ -1697,7 +1697,7 @@
             /* !Variables */
 
             text_segment_t *p_segments =
-                    ConvertCuesToSegments( p_dec, i_start, i_stop, &v,
+                    ConvertCuesToSegments( p_dec, i_nzstart, i_nzstop, &v,
                                           (const webvtt_dom_cue_t *)p_vttregion->p_child );
             if( !p_segments )
                 continue;
@@ -1744,7 +1744,7 @@
             if( p_cue->type != NODE_CUE )
                 continue;
 
-            if( p_cue->i_start > i_start || p_cue->i_stop <= i_start )
+            if( p_cue->i_nzstart > i_nzstart || p_cue->i_nzstop <= i_nzstart )
                 continue;
 
             text_segment_t *p_segments = ConvertCueToSegments( p_dec, &v, p_cue );
@@ -1782,8 +1782,8 @@
 
     if( p_spu )
     {
-        p_spu->i_start = i_start;
-        p_spu->i_stop = i_stop;
+        p_spu->i_start = VLC_TS_0 + i_nzstart;
+        p_spu->i_stop = VLC_TS_0 + i_nzstop;
         p_spu->b_ephemer  = true; /* !important */
         p_spu->b_absolute = false; /* can't be absolute as snap to lines can overlap ! */
 
@@ -1798,39 +1798,39 @@
 {
     const webvtt_dom_tag_t *ta = *((const webvtt_dom_tag_t **) a);
     const webvtt_dom_tag_t *tb = *((const webvtt_dom_tag_t **) b);
-    const int64_t result = ta->i_start - tb->i_start;
+    const int64_t result = ta->i_nzstart - tb->i_nzstart;
     return result == 0 ? 0 : result > 0 ? 1 : -1;
 }
 
-static void Render( decoder_t *p_dec, mtime_t i_start, mtime_t i_stop )
+static void Render( decoder_t *p_dec, mtime_t i_nzstart, mtime_t i_nzstop )
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
 
     vlc_array_t timedtags;
     vlc_array_init( &timedtags );
 
-    GetTimedTags( p_sys->p_root->p_child, i_start, i_stop, &timedtags );
+    GetTimedTags( p_sys->p_root->p_child, i_nzstart, i_nzstop, &timedtags );
     if( timedtags.i_count )
         qsort( timedtags.pp_elems, timedtags.i_count, sizeof(*timedtags.pp_elems), timedtagsArrayCmp );
 
-    mtime_t i_substart = i_start;
+    mtime_t i_subnzstart = i_nzstart;
     for( size_t i=0; i<timedtags.i_count; i++ )
     {
          const webvtt_dom_tag_t *p_tag =
                  (const webvtt_dom_tag_t *) vlc_array_item_at_index( &timedtags, i );
-         if( p_tag->i_start != i_substart ) /* might be duplicates */
+         if( p_tag->i_nzstart != i_subnzstart ) /* might be duplicates */
          {
              if( i > 0 )
                  ClearCSSStyles( (webvtt_dom_node_t *)p_sys->p_root );
-             RenderRegions( p_dec, i_substart, p_tag->i_start );
-             i_substart = p_tag->i_start;
+             RenderRegions( p_dec, i_subnzstart, p_tag->i_nzstart );
+             i_subnzstart = p_tag->i_nzstart;
          }
     }
-    if( i_substart != i_stop )
+    if( i_subnzstart != i_nzstop )
     {
-        if( i_substart != i_start )
+        if( i_subnzstart != i_nzstart )
             ClearCSSStyles( (webvtt_dom_node_t *)p_sys->p_root );
-        RenderRegions( p_dec, i_substart, i_stop );
+        RenderRegions( p_dec, i_subnzstart, i_nzstop );
     }
 
     vlc_array_clear( &timedtags );
@@ -1838,7 +1838,7 @@
 
 static int ProcessISOBMFF( decoder_t *p_dec,
                            const uint8_t *p_buffer, size_t i_buffer,
-                           mtime_t i_start, mtime_t i_stop )
+                           mtime_t i_nzstart, mtime_t i_nzstop )
 {
     mp4_box_iterator_t it;
     mp4_box_iterator_Init( &it, p_buffer, i_buffer );
@@ -1846,7 +1846,7 @@
     {
         if( it.i_type == ATOM_vttc || it.i_type == ATOM_vttx )
         {
-            webvtt_dom_cue_t *p_cue = webvtt_dom_cue_New( i_start, i_stop );
+            webvtt_dom_cue_t *p_cue = webvtt_dom_cue_New( i_nzstart, i_nzstop );
             if( !p_cue )
                 continue;
 
@@ -2023,18 +2023,18 @@
     if( p_block == NULL ) /* No Drain */
         return VLCDEC_SUCCESS;
 
-    mtime_t i_start = p_block->i_pts - VLC_TS_0;
-    mtime_t i_stop = i_start + p_block->i_length;
+    mtime_t i_nzstart = p_block->i_pts - VLC_TS_0;
+    mtime_t i_nzstop = i_nzstart + p_block->i_length;
 
     if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY )
         Flush( p_dec );
     else
-        ClearCuesByTime( &p_dec->p_sys->p_root->p_child, i_start );
+        ClearCuesByTime( &p_dec->p_sys->p_root->p_child, i_nzstart );
 
     ProcessISOBMFF( p_dec, p_block->p_buffer, p_block->i_buffer,
-                    i_start, i_stop );
+                    i_nzstart, i_nzstop );
 
-    Render( p_dec, i_start, i_stop );
+    Render( p_dec, i_nzstart, i_nzstop );
 
     block_Release( p_block );
     return VLCDEC_SUCCESS;
diff -Nru vlc-3.0.12/modules/codec/x264.c vlc-3.0.16/modules/codec/x264.c
--- vlc-3.0.12/modules/codec/x264.c	2018-11-08 11:36:28.000000000 +0100
+++ vlc-3.0.16/modules/codec/x264.c	2021-06-16 07:37:33.000000000 +0200
@@ -2,7 +2,7 @@
  * x264.c: h264 video encoder
  *****************************************************************************
  * Copyright (C) 2004-2010 the VideoLAN team
- * $Id: bcf3c89a10f1b18af01275b6855515ad59a8e7b6 $
+ * $Id: 66ad2419744500d1fb9e49b9760db3741f03f9fe $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Ilkka Ollakka <ileoo (at)videolan org>
@@ -681,7 +681,7 @@
         change_integer_range( 0, 1000 )
 
     add_integer( SOUT_CFG_PREFIX "deadzone-inter", 21, DEADZONE_INTER_TEXT,
-                 DEADZONE_INTRA_LONGTEXT, true )
+                 DEADZONE_INTER_LONGTEXT, true )
         change_integer_range( 0, 32 )
 
     add_integer( SOUT_CFG_PREFIX "deadzone-intra", 11, DEADZONE_INTRA_TEXT,
diff -Nru vlc-3.0.12/modules/demux/adaptive/playlist/Inheritables.cpp vlc-3.0.16/modules/demux/adaptive/playlist/Inheritables.cpp
--- vlc-3.0.12/modules/demux/adaptive/playlist/Inheritables.cpp	2019-10-27 08:56:42.000000000 +0100
+++ vlc-3.0.16/modules/demux/adaptive/playlist/Inheritables.cpp	2021-03-26 13:48:07.000000000 +0100
@@ -23,6 +23,7 @@
 #endif
 
 #include "Inheritables.hpp"
+#include <limits>
 
 using namespace adaptive::playlist;
 using namespace adaptive;
diff -Nru vlc-3.0.12/modules/demux/adaptive/playlist/SegmentInformation.cpp vlc-3.0.16/modules/demux/adaptive/playlist/SegmentInformation.cpp
--- vlc-3.0.12/modules/demux/adaptive/playlist/SegmentInformation.cpp	2020-10-24 20:21:13.000000000 +0200
+++ vlc-3.0.16/modules/demux/adaptive/playlist/SegmentInformation.cpp	2021-03-26 13:47:35.000000000 +0100
@@ -34,6 +34,7 @@
 
 #include <algorithm>
 #include <cassert>
+#include <limits>
 
 using namespace adaptive::playlist;
 
diff -Nru vlc-3.0.12/modules/demux/adaptive/playlist/SegmentTimeline.cpp vlc-3.0.16/modules/demux/adaptive/playlist/SegmentTimeline.cpp
--- vlc-3.0.12/modules/demux/adaptive/playlist/SegmentTimeline.cpp	2020-03-30 17:13:47.000000000 +0200
+++ vlc-3.0.16/modules/demux/adaptive/playlist/SegmentTimeline.cpp	2021-03-26 13:47:55.000000000 +0100
@@ -2,7 +2,7 @@
  * SegmentTimeline.cpp: Implement the SegmentTimeline tag.
  *****************************************************************************
  * Copyright (C) 1998-2007 VLC authors and VideoLAN
- * $Id: 7daa517ddec8e31240e0283bc2e4beb0c90cdf9d $
+ * $Id: cab205ca773394cb05cdf589f6abca52b4516d68 $
  *
  * Authors: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
  *
@@ -27,6 +27,7 @@
 #include "SegmentTimeline.h"
 
 #include <algorithm>
+#include <limits>
 
 using namespace adaptive::playlist;
 
diff -Nru vlc-3.0.12/modules/demux/adaptive/plumbing/FakeESOutID.cpp vlc-3.0.16/modules/demux/adaptive/plumbing/FakeESOutID.cpp
--- vlc-3.0.12/modules/demux/adaptive/plumbing/FakeESOutID.cpp	2020-10-24 20:21:13.000000000 +0200
+++ vlc-3.0.16/modules/demux/adaptive/plumbing/FakeESOutID.cpp	2021-03-20 19:20:19.000000000 +0100
@@ -80,6 +80,10 @@
     if((fmt.i_extra > 0) ^ (p_other->fmt.i_extra > 0))
         return false;
 
+    if(fmt.i_profile != p_other->fmt.i_profile ||
+       fmt.i_level != p_other->fmt.i_level)
+        return false;
+
     switch(fmt.i_codec)
     {
         case VLC_CODEC_H264:
diff -Nru vlc-3.0.12/modules/demux/adaptive/Streams.cpp vlc-3.0.16/modules/demux/adaptive/Streams.cpp
--- vlc-3.0.12/modules/demux/adaptive/Streams.cpp	2021-01-17 21:31:01.000000000 +0100
+++ vlc-3.0.16/modules/demux/adaptive/Streams.cpp	2021-01-18 17:28:01.000000000 +0100
@@ -427,8 +427,8 @@
 
     if(fakeEsOut()->commandsQueue()->isDraining())
     {
-        AdvDebug(vlc_tick_t pcrvalue = fakeEsOut()->commandsQueue()->getPCR();
-                 vlc_tick_t dtsvalue = fakeEsOut()->commandsQueue()->getFirstDTS();
+        AdvDebug(mtime_t pcrvalue = fakeEsOut()->commandsQueue()->getPCR();
+                 mtime_t dtsvalue = fakeEsOut()->commandsQueue()->getFirstDTS();
                  msg_Dbg(p_realdemux, "Stream %s pcr %" PRId64 " dts %" PRId64 " deadline %" PRId64 " [DRAINING]",
                          description.c_str(), pcrvalue, dtsvalue, nz_deadline));
 
diff -Nru vlc-3.0.12/modules/demux/asf/asf.c vlc-3.0.16/modules/demux/asf/asf.c
--- vlc-3.0.12/modules/demux/asf/asf.c	2020-11-09 15:42:20.000000000 +0100
+++ vlc-3.0.16/modules/demux/asf/asf.c	2021-05-26 10:24:22.000000000 +0200
@@ -1218,7 +1218,7 @@
     free( fmt_priorities_bitrate_ex.pi_stream_numbers );
 
     p_sys->i_data_begin = p_sys->p_root->p_data->i_object_pos + 50;
-    if( p_sys->p_root->p_data->i_object_size != 0 )
+    if( p_sys->p_root->p_data->i_object_size > 50 ) /* see libasf ASF_OBJECT_DATA <= 50 handling */
     { /* local file */
         p_sys->i_data_end = p_sys->p_root->p_data->i_object_pos +
                                     p_sys->p_root->p_data->i_object_size;
diff -Nru vlc-3.0.12/modules/demux/asf/asfpacket.c vlc-3.0.16/modules/demux/asf/asfpacket.c
--- vlc-3.0.12/modules/demux/asf/asfpacket.c	2020-11-09 15:42:20.000000000 +0100
+++ vlc-3.0.16/modules/demux/asf/asfpacket.c	2021-06-07 11:06:03.000000000 +0200
@@ -405,8 +405,8 @@
 
     const uint64_t i_read_pos = vlc_stream_Tell( p_demux->s );
     if( i_read_pos < i_data_begin ||
-        i_data_packet_min > i_data_end ||
-        i_read_pos > i_data_end - i_data_packet_min )
+        (i_data_end && ( i_data_packet_min > i_data_end ||
+                         i_read_pos > i_data_end - i_data_packet_min ) ) )
         return 0;
 
     const uint8_t *p_peek;
@@ -477,8 +477,9 @@
     pkt.send_time = GetDWLE( p_peek + i_skip ); i_skip += 4;
     /* uint16_t i_packet_duration = GetWLE( p_peek + i_skip ); */ i_skip += 2;
 
-    if( pkt.length > i_data_end ||
-        i_read_pos > i_data_end - pkt.length )
+    if( i_data_end &&
+        (pkt.length > i_data_end ||
+         i_read_pos > i_data_end - pkt.length) )
     {
         msg_Warn( p_demux, "pkt size %"PRIu32" at %"PRIu64" does not fit data chunk",
                   pkt.length, i_read_pos );
diff -Nru vlc-3.0.12/modules/demux/av1_unpack.h vlc-3.0.16/modules/demux/av1_unpack.h
--- vlc-3.0.12/modules/demux/av1_unpack.h	2018-10-28 12:11:19.000000000 +0100
+++ vlc-3.0.16/modules/demux/av1_unpack.h	2021-04-27 15:18:39.000000000 +0200
@@ -55,6 +55,8 @@
         if(AV1_OBUHasSizeField(p_obu))
             continue;
         const uint8_t i_header = 1 + AV1_OBUHasExtensionField(p_obu);
+        if(i_header > i_obu)
+            break;
         const uint8_t i_sizelen = leb128_expected(i_obu - i_header);
         const size_t i_obu_offset = p_obu - p_block->p_buffer;
 
diff -Nru vlc-3.0.12/modules/demux/avi/avi.c vlc-3.0.16/modules/demux/avi/avi.c
--- vlc-3.0.12/modules/demux/avi/avi.c	2021-01-17 21:31:01.000000000 +0100
+++ vlc-3.0.16/modules/demux/avi/avi.c	2021-03-26 13:45:59.000000000 +0100
@@ -2,7 +2,7 @@
  * avi.c : AVI file Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001-2009 VLC authors and VideoLAN
- * $Id: ee31340bb6e213a2e0d9eb5e22b390007debe28c $
+ * $Id: 8cdb2c556873a0b308c068392f543ef122a4da61 $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -550,9 +550,11 @@
                     tk->i_samplesize = tk->i_blocksize;
                 }
 
-                if( tk->fmt.i_codec == VLC_CODEC_VORBIS )
+                /* fix VBR decoding */
+                if( tk->fmt.i_codec == VLC_CODEC_VORBIS ||
+                    tk->fmt.i_codec == VLC_CODEC_FLAC )
                 {
-                    tk->i_blocksize = 0; /* fix vorbis VBR decoding */
+                    tk->i_blocksize = 0;
                 }
 
                 if ( tk->fmt.i_codec == VLC_CODEC_MP4A )
diff -Nru vlc-3.0.12/modules/demux/hls/playlist/Parser.cpp vlc-3.0.16/modules/demux/hls/playlist/Parser.cpp
--- vlc-3.0.12/modules/demux/hls/playlist/Parser.cpp	2020-07-27 10:31:07.000000000 +0200
+++ vlc-3.0.16/modules/demux/hls/playlist/Parser.cpp	2021-03-26 13:46:44.000000000 +0100
@@ -42,6 +42,7 @@
 #include <map>
 #include <cctype>
 #include <algorithm>
+#include <limits>
 
 using namespace adaptive;
 using namespace adaptive::playlist;
diff -Nru vlc-3.0.12/modules/demux/mkv/matroska_segment.cpp vlc-3.0.16/modules/demux/mkv/matroska_segment.cpp
--- vlc-3.0.12/modules/demux/mkv/matroska_segment.cpp	2020-07-27 10:31:07.000000000 +0200
+++ vlc-3.0.16/modules/demux/mkv/matroska_segment.cpp	2021-03-26 13:46:36.000000000 +0100
@@ -2,7 +2,7 @@
  * matroska_segment.cpp : matroska demuxer
  *****************************************************************************
  * Copyright (C) 2003-2010 VLC authors and VideoLAN
- * $Id: 4b4c73e23c648e596e5a77342c8f10a5ecd0baac $
+ * $Id: 7e2bd8a0aea85a4f3fa9ade2ffda05852a032fed $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Steve Lhomme <steve.lhomme@free.fr>
@@ -31,6 +31,7 @@
 
 #include <new>
 #include <iterator>
+#include <limits>
 
 matroska_segment_c::matroska_segment_c( demux_sys_t & demuxer, EbmlStream & estream, KaxSegment *p_seg )
     :segment(p_seg)
diff -Nru vlc-3.0.12/modules/demux/mkv/mkv.cpp vlc-3.0.16/modules/demux/mkv/mkv.cpp
--- vlc-3.0.12/modules/demux/mkv/mkv.cpp	2020-07-27 10:31:07.000000000 +0200
+++ vlc-3.0.16/modules/demux/mkv/mkv.cpp	2021-03-26 13:46:36.000000000 +0100
@@ -2,7 +2,7 @@
  * mkv.cpp : matroska demuxer
  *****************************************************************************
  * Copyright (C) 2003-2005, 2008, 2010 VLC authors and VideoLAN
- * $Id: 9fecb52ed670b32e4a30affda07748f2d5683796 $
+ * $Id: 44e9fa805fa7b77eb2b8b3dd8ad68a6fe981d086 $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Steve Lhomme <steve.lhomme@free.fr>
@@ -34,6 +34,7 @@
 #include "stream_io_callback.hpp"
 
 #include <new>
+#include <limits>
 
 extern "C" {
     #include "../av1_unpack.h"
diff -Nru vlc-3.0.12/modules/demux/mp4/libmp4.c vlc-3.0.16/modules/demux/mp4/libmp4.c
--- vlc-3.0.12/modules/demux/mp4/libmp4.c	2020-02-03 10:35:34.000000000 +0100
+++ vlc-3.0.16/modules/demux/mp4/libmp4.c	2021-03-20 19:20:19.000000000 +0100
@@ -1505,14 +1505,22 @@
     MP4_READBOX_EXIT( 1 );
 }
 
-static int MP4_ReadBox_LtdContainer( stream_t *p_stream, MP4_Box_t *p_box )
+static int MP4_ReadBox_LtdContainer( stream_t *p_stream, MP4_Box_t *p_box,
+                                     const uint8_t versions[2], size_t i_versions )
 {
     MP4_READBOX_ENTER_PARTIAL( MP4_Box_data_lcont_t, 16, NULL );
     if( i_read < 8 )
         MP4_READBOX_EXIT( 0 );
 
     MP4_GETVERSIONFLAGS( p_box->data.p_lcont );
-    if( p_box->data.p_lcont->i_version != 0 )
+    bool b_version_ok = true;
+    for( size_t i=0; i<i_versions; i++ )
+    {
+        b_version_ok = (p_box->data.p_lcont->i_version == versions[i]);
+        if( b_version_ok )
+            break;
+    }
+    if( !b_version_ok )
         MP4_READBOX_EXIT( 0 );
     MP4_GET4BYTES( p_box->data.p_lcont->i_entry_count );
 
@@ -1547,6 +1555,18 @@
     MP4_READBOX_EXIT( 1 );
 }
 
+static int MP4_ReadBox_stsd( stream_t *p_stream, MP4_Box_t *p_box )
+{
+    const uint8_t versions[] = {0, 1};
+    return MP4_ReadBox_LtdContainer( p_stream, p_box, versions, 2 );
+}
+
+static int MP4_ReadBox_dref( stream_t *p_stream, MP4_Box_t *p_box )
+{
+    const uint8_t versions[] = {0};
+    return MP4_ReadBox_LtdContainer( p_stream, p_box, versions, 1 );
+}
+
 static void MP4_FreeBox_stts( MP4_Box_t *p_box )
 {
     FREENULL( p_box->data.p_stts->pi_sample_count );
@@ -2598,6 +2618,14 @@
     if( p_box->data.p_sample_soun->i_qt_version == 1 && i_read >= 16 )
     {
         /* SoundDescriptionV1 */
+
+        if( p_box->data.p_sample_soun->i_sampleratehi == 0x1 && //65536
+            p_box->data.p_sample_soun->i_sampleratelo == 0x0 )  //remainder
+        {
+            /* ISOBMFF sets to 1 << 16, qtff does not */
+            p_box->data.p_sample_soun->i_sampleratehi = 0;
+        }
+
         MP4_GET4BYTES( p_box->data.p_sample_soun->i_sample_per_packet );
         MP4_GET4BYTES( p_box->data.p_sample_soun->i_bytes_per_packet );
         MP4_GET4BYTES( p_box->data.p_sample_soun->i_bytes_per_frame );
@@ -4493,11 +4521,11 @@
     { ATOM_alis,    MP4_ReadBoxSkip,          ATOM_dref },
     { ATOM_url,     MP4_ReadBox_url,          0 },
     { ATOM_urn,     MP4_ReadBox_urn,          0 },
-    { ATOM_dref,    MP4_ReadBox_LtdContainer, 0 },
+    { ATOM_dref,    MP4_ReadBox_dref,         0 },
     { ATOM_stts,    MP4_ReadBox_stts,         ATOM_stbl },
     { ATOM_ctts,    MP4_ReadBox_ctts,         ATOM_stbl },
     { ATOM_cslg,    MP4_ReadBox_cslg,         ATOM_stbl },
-    { ATOM_stsd,    MP4_ReadBox_LtdContainer, ATOM_stbl },
+    { ATOM_stsd,    MP4_ReadBox_stsd,         ATOM_stbl },
     { ATOM_stsz,    MP4_ReadBox_stsz,         ATOM_stbl },
     { ATOM_stsc,    MP4_ReadBox_stsc,         ATOM_stbl },
     { ATOM_stco,    MP4_ReadBox_stco_co64,    ATOM_stbl },
diff -Nru vlc-3.0.12/modules/demux/mp4/mp4.c vlc-3.0.16/modules/demux/mp4/mp4.c
--- vlc-3.0.12/modules/demux/mp4/mp4.c	2020-11-09 15:42:20.000000000 +0100
+++ vlc-3.0.16/modules/demux/mp4/mp4.c	2021-06-07 11:06:03.000000000 +0200
@@ -1645,6 +1645,7 @@
 
             i_time += dur;
             i_pos += len;
+            i_sample++;
         }
     }
 
@@ -4375,7 +4376,7 @@
         msg_Dbg( p_demux, "tk(%i)=%"PRId64" mv=%"PRId64" pos=%"PRIu64, p_track->i_track_ID,
                  VLC_TS_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ ),
                  VLC_TS_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ ),
-                 p_track->context.i_trun_sample_pos );
+                 p_track->context.i_trun_sample_pos - i_read );
 #endif
         if ( p_track->p_es )
         {
diff -Nru vlc-3.0.12/modules/demux/mpeg/h26x.c vlc-3.0.16/modules/demux/mpeg/h26x.c
--- vlc-3.0.12/modules/demux/mpeg/h26x.c	2019-10-11 17:35:28.000000000 +0200
+++ vlc-3.0.16/modules/demux/mpeg/h26x.c	2021-03-26 13:45:59.000000000 +0100
@@ -77,7 +77,8 @@
 {
     es_out_id_t *p_es;
 
-    date_t      dts;
+    date_t      feed_dts;
+    date_t      output_dts;
     unsigned    frame_rate_num;
     unsigned    frame_rate_den;
 
@@ -346,18 +347,19 @@
         if ( f_fps < 0.001f ) f_fps = 0.001f;
         p_sys->frame_rate_den = 1000;
         p_sys->frame_rate_num = 1000 * f_fps;
-        date_Init( &p_sys->dts, 2 * p_sys->frame_rate_num, p_sys->frame_rate_den );
+        date_Init( &p_sys->feed_dts, 2 * p_sys->frame_rate_num, p_sys->frame_rate_den );
     }
     else
-        date_Init( &p_sys->dts, 2 * 30000, 1000 );
-    date_Set( &p_sys->dts, VLC_TS_0 );
+        date_Init( &p_sys->feed_dts, 25000, 1000 );
+    date_Set( &p_sys->feed_dts, VLC_TS_0 );
+    p_sys->output_dts = p_sys->feed_dts;
 
     /* Load the mpegvideo packetizer */
     es_format_Init( &fmt, VIDEO_ES, i_codec );
     if( f_fps )
     {
-        fmt.video.i_frame_rate = p_sys->dts.i_divider_num >> 1;
-        fmt.video.i_frame_rate_base = p_sys->dts.i_divider_den;
+        fmt.video.i_frame_rate = p_sys->feed_dts.i_divider_num >> 1;
+        fmt.video.i_frame_rate_base = p_sys->feed_dts.i_divider_den;
     }
     p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, psz_module );
     if( !p_sys->p_packetizer )
@@ -422,7 +424,7 @@
     }
     else
     {
-        p_block_in->i_dts = date_Get( &p_sys->dts );
+        p_block_in->i_dts = date_Get( &p_sys->feed_dts );
     }
 
     while( (p_block_out = p_sys->p_packetizer->pf_packetize( p_sys->p_packetizer,
@@ -431,12 +433,35 @@
         while( p_block_out )
         {
             block_t *p_next = p_block_out->p_next;
-
             p_block_out->p_next = NULL;
 
+            if( p_sys->p_packetizer->fmt_out.video.i_frame_rate_base &&
+                p_sys->p_packetizer->fmt_out.video.i_frame_rate_base != p_sys->frame_rate_den &&
+                p_sys->p_packetizer->fmt_out.video.i_frame_rate &&
+                p_sys->p_packetizer->fmt_out.video.i_frame_rate_base != p_sys->frame_rate_num )
+            {
+                p_sys->frame_rate_num = p_sys->p_packetizer->fmt_out.video.i_frame_rate;
+                p_sys->frame_rate_den = p_sys->p_packetizer->fmt_out.video.i_frame_rate_base;
+                date_Change( &p_sys->feed_dts, 2 * p_sys->frame_rate_num, p_sys->frame_rate_den );
+                date_Change( &p_sys->output_dts, 2 * p_sys->frame_rate_num, p_sys->frame_rate_den );
+                msg_Dbg( p_demux, "using %.2f fps", (double) p_sys->frame_rate_num / p_sys->frame_rate_den );
+            }
+
+            /* we only want to use the pts-dts offset and length from packetizer */
+            mtime_t dtsdiff = p_block_out->i_pts > p_block_out->i_dts
+                            ? p_block_out->i_pts - p_block_out->i_dts
+                            : 0;
+            /* Always start frame N=1 so we get PCR on N=0 */
+            date_t dtsdate = p_sys->output_dts;
+            mtime_t dts = date_Increment( &dtsdate, 2 );
+
+            p_block_out->i_dts = dts;
+            if( p_block_out->i_pts != VLC_TS_INVALID )
+                p_block_out->i_pts = dts + dtsdiff;
+
             if( p_block_in )
             {
-                p_block_in->i_dts = date_Get( &p_sys->dts );
+                p_block_in->i_dts = date_Get( &p_sys->feed_dts );
                 p_block_in->i_pts = VLC_TS_INVALID;
             }
 
@@ -453,23 +478,18 @@
 
             /* h264 packetizer does merge multiple NAL into AU, but slice flag persists */
             bool frame = p_block_out->i_flags & BLOCK_FLAG_TYPE_MASK;
-            const mtime_t i_frame_dts = p_block_out->i_dts;
             const mtime_t i_frame_length = p_block_out->i_length;
+
+            /* first output */
+            if( date_Get( &p_sys->output_dts ) == VLC_TS_0 )
+                es_out_SetPCR( p_demux->out, date_Get( &p_sys->output_dts ) );
+
             es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
+
+            mtime_t pcr = b_eof ? dts : date_Get( &p_sys->output_dts );
+
             if( frame )
             {
-                if( p_sys->p_packetizer->fmt_out.video.i_frame_rate_base &&
-                    p_sys->p_packetizer->fmt_out.video.i_frame_rate_base != p_sys->frame_rate_den &&
-                    p_sys->p_packetizer->fmt_out.video.i_frame_rate &&
-                    p_sys->p_packetizer->fmt_out.video.i_frame_rate_base != p_sys->frame_rate_num )
-                {
-                    p_sys->frame_rate_num = p_sys->p_packetizer->fmt_out.video.i_frame_rate;
-                    p_sys->frame_rate_den = p_sys->p_packetizer->fmt_out.video.i_frame_rate_base;
-                    date_Change( &p_sys->dts, 2 * p_sys->frame_rate_num, p_sys->frame_rate_den );
-                    msg_Dbg( p_demux, "using %.2f fps", (double) p_sys->frame_rate_num / p_sys->frame_rate_den );
-                }
-
-                es_out_SetPCR( p_demux->out, date_Get( &p_sys->dts ) );
                 unsigned i_nb_fields;
                 if( i_frame_length > 0 )
                 {
@@ -478,11 +498,13 @@
                 }
                 else i_nb_fields = 2;
                 if( i_nb_fields <= 6 ) /* in the legit range */
-                    date_Increment( &p_sys->dts, i_nb_fields );
-                else /* Somehow some discontinuity */
-                    date_Set( &p_sys->dts, i_frame_dts );
+                {
+                    date_Increment( &p_sys->output_dts, i_nb_fields );
+                }
             }
 
+            es_out_SetPCR( p_demux->out, pcr );
+
             p_block_out = p_next;
         }
     }
diff -Nru vlc-3.0.12/modules/demux/mpeg/ts_hotfixes.c vlc-3.0.16/modules/demux/mpeg/ts_hotfixes.c
--- vlc-3.0.12/modules/demux/mpeg/ts_hotfixes.c	2018-09-04 12:53:13.000000000 +0200
+++ vlc-3.0.16/modules/demux/mpeg/ts_hotfixes.c	2021-03-26 13:45:59.000000000 +0100
@@ -167,11 +167,11 @@
     {
         pid->probed.i_cat = AUDIO_ES;
         if( p_data[0] == 0xFF && (p_data[1] & 0xE0) == 0xE0 &&
-           (p_data[1] & 0x0C) != 0x04 && (p_data[1] & 0x03) == 0x00 )
+           (p_data[1] & 0x18) != 0x08 && (p_data[1] & 0x06) != 0x00 )
         {
             pid->probed.i_fourcc = VLC_CODEC_MPGA;
         }
-        else if( p_data[0] == 0xFF && (p_data[1] & 0xF2) == 0xF0 )
+        else if( p_data[0] == 0xFF && (p_data[1] & 0xF6) == 0xF0 )
         {
             pid->probed.i_fourcc = VLC_CODEC_MP4A; /* ADTS */
             pid->probed.i_original_fourcc = VLC_FOURCC('A','D','T','S');
diff -Nru vlc-3.0.12/modules/demux/subtitle.c vlc-3.0.16/modules/demux/subtitle.c
--- vlc-3.0.12/modules/demux/subtitle.c	2018-04-27 12:06:21.000000000 +0200
+++ vlc-3.0.16/modules/demux/subtitle.c	2021-04-27 15:18:39.000000000 +0200
@@ -2,7 +2,7 @@
  * subtitle.c: Demux for subtitle text files.
  *****************************************************************************
  * Copyright (C) 1999-2007 VLC authors and VideoLAN
- * $Id: 83ba0726e5f265525f2de596891f83261f1f7293 $
+ * $Id: 84bd4acd59285ec2cae5bf027cf96c253d6dfe10 $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Derk-Jan Hartman <hartman at videolan dot org>
@@ -55,7 +55,7 @@
     N_("Override the normal frames per second settings. " \
     "This will only work with MicroDVD and SubRIP (SRT) subtitles.")
 #define SUB_TYPE_LONGTEXT \
-    N_("Force the subtiles format. Selecting \"auto\" means autodetection and should always work.")
+    N_("Force the subtitles format. Selecting \"auto\" means autodetection and should always work.")
 #define SUB_DESCRIPTION_LONGTEXT \
     N_("Override the default track description.")
 
@@ -1619,18 +1619,16 @@
         /* Data Lines */
         if( sscanf (s, "-->> %d", &t) == 1)
         {
-            p_subtitle->i_start = (int64_t)t; /* * FPS*/
-            p_subtitle->i_stop  = -1;
-
             /* Starting of a subtitle */
             if( i_firstline )
             {
+                p_subtitle->i_start = t * p_props->i_microsecperframe;
                 i_firstline = 0;
             }
             /* We have been too far: end of the subtitle, begin of next */
             else
             {
-                TextPreviousLine( txt );
+                p_subtitle->i_stop  = t * p_props->i_microsecperframe;
                 break;
             }
         }
diff -Nru vlc-3.0.12/modules/gui/qt/components/complete_preferences.cpp vlc-3.0.16/modules/gui/qt/components/complete_preferences.cpp
--- vlc-3.0.12/modules/gui/qt/components/complete_preferences.cpp	2017-11-24 16:29:17.000000000 +0100
+++ vlc-3.0.16/modules/gui/qt/components/complete_preferences.cpp	2021-06-16 07:37:33.000000000 +0200
@@ -2,7 +2,7 @@
  * complete_preferences.cpp : "Normal preferences"
  ****************************************************************************
  * Copyright (C) 2006-2011 the VideoLAN team
- * $Id: bca44457d37b1776eab196046f15fd23d41c5ffd $
+ * $Id: 5ca04b46b15406d851c50a9fc99bccca3e396302 $
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
  *
@@ -680,13 +680,14 @@
 
         if( p_item->i_type == CONFIG_SECTION )
         {
-            if( box )
+            if( box && i_boxline > 0 )
             {
                 box->setLayout( boxlayout );
                 box->show();
                 layout->addWidget( box, i_line, 0, 1, -1 );
                 i_line++;
             }
+            i_boxline = 0;
             box = new QGroupBox( qtr( p_item->psz_text ), this );
             box->hide();
             boxlayout = new QGridLayout();
diff -Nru vlc-3.0.12/modules/gui/qt/components/interface_widgets.cpp vlc-3.0.16/modules/gui/qt/components/interface_widgets.cpp
--- vlc-3.0.12/modules/gui/qt/components/interface_widgets.cpp	2021-01-17 21:31:56.000000000 +0100
+++ vlc-3.0.16/modules/gui/qt/components/interface_widgets.cpp	2021-03-20 19:20:19.000000000 +0100
@@ -2,7 +2,7 @@
  * interface_widgets.cpp : Custom widgets for the main interface
  ****************************************************************************
  * Copyright (C) 2006-2010 the VideoLAN team
- * $Id: 78dbc2f9c3562e481f980d5751031740aaf22b07 $
+ * $Id: ff44bf2e44af584f28c70cc4c51436cd275b271a $
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
  *          Jean-Baptiste Kempf <jb@videolan.org>
@@ -35,6 +35,7 @@
 
 #include "menus.hpp"             /* Popup menu on bgWidget */
 
+#include <QDate>
 #include <QLabel>
 #include <QToolButton>
 #include <QPalette>
@@ -227,13 +228,16 @@
     return current_size;
 }
 
+void WindowResized(vout_window_t *, const QSize&);
+void WindowReleased(vout_window_t *);
+
 void VideoWidget::reportSize()
 {
     if( !p_window )
         return;
 
     QSize size = physicalSize();
-    vout_window_ReportSize( p_window, size.width(), size.height() );
+    WindowResized(p_window, size);
 }
 
 /* Set the Widget to the correct Size */
@@ -375,6 +379,7 @@
 
     if( stable )
     {
+        WindowReleased(p_window);
         layout->removeWidget( stable );
         stable->deleteLater();
         stable = NULL;
@@ -445,6 +450,8 @@
             i_pos + 5 == title.indexOf( "Bi" /* directional */ "ll",
                                        i_pos, Qt::CaseInsensitive ) )
                 updateDefaultArt( ":/logo/vlc128-kb.png" );
+        else if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY )
+                updateDefaultArt( ":/logo/vlc128-xmas.png" );
         else
                 updateDefaultArt( ":/logo/vlc128.png" );
     }
diff -Nru vlc-3.0.12/modules/gui/qt/components/playlist/standardpanel.cpp vlc-3.0.16/modules/gui/qt/components/playlist/standardpanel.cpp
--- vlc-3.0.12/modules/gui/qt/components/playlist/standardpanel.cpp	2017-11-24 16:29:17.000000000 +0100
+++ vlc-3.0.16/modules/gui/qt/components/playlist/standardpanel.cpp	2021-04-27 15:18:39.000000000 +0200
@@ -2,7 +2,7 @@
  * standardpanel.cpp : The "standard" playlist panel : just a treeview
  ****************************************************************************
  * Copyright © 2000-2010 VideoLAN
- * $Id: 3d6fe6e6a8b9b5d55e720d348fda47a42495247a $
+ * $Id: 6e7ba66cca4e356d62246e046bc1cc08e47ff92b $
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
  *          Jean-Baptiste Kempf <jb@videolan.org>
@@ -322,8 +322,10 @@
         temp = model->getURI( index );
         if( ! temp.isEmpty() ) path = vlc_uri2path( temp.toLatin1().constData() );
         if( path == NULL ) return;
+        temp = QFileInfo( qfu( path ) ).absolutePath();
+        if( !QFileInfo( temp ).isDir() ) return;
         QDesktopServices::openUrl(
-                    QUrl::fromLocalFile( QFileInfo( qfu( path ) ).absolutePath() ) );
+                    QUrl::fromLocalFile( temp ) );
         free( path );
         break;
 
diff -Nru vlc-3.0.12/modules/gui/qt/components/preferences_widgets.cpp vlc-3.0.16/modules/gui/qt/components/preferences_widgets.cpp
--- vlc-3.0.12/modules/gui/qt/components/preferences_widgets.cpp	2017-12-04 01:34:27.000000000 +0100
+++ vlc-3.0.16/modules/gui/qt/components/preferences_widgets.cpp	2021-06-16 07:37:33.000000000 +0200
@@ -2,7 +2,7 @@
  * preferences_widgets.cpp : Widgets for preferences displays
  ****************************************************************************
  * Copyright (C) 2006-2011 the VideoLAN team
- * $Id: 1419bac1140479bad842488d190d99f50ab19005 $
+ * $Id: 64121b6dc14594cb5c84bd5e1d0a72d913f18183 $
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
  *          Antoine Cellerier <dionoea@videolan.org>
@@ -703,15 +703,6 @@
         }
     }
     module_list_free( p_list );
-
-    if( p_item->psz_longtext )
-    {
-        QString tipText = qtr(p_item->psz_longtext);
-
-        text->setToolTip( formatTooltip(tipText) );
-        assert( groupBox );
-        groupBox->setToolTip( formatTooltip(tipText) );
-   }
 }
 
 QString ModuleListConfigControl::getValue() const
@@ -1196,9 +1187,6 @@
 
 void KeySelectorControl::finish()
 {
-    if( label && p_item->psz_longtext )
-        label->setToolTip( formatTooltip( qtr( p_item->psz_longtext ) ) );
-
     /* Fill the table */
 
     /* Get the main Module */
diff -Nru vlc-3.0.12/modules/gui/qt/main_interface.cpp vlc-3.0.16/modules/gui/qt/main_interface.cpp
--- vlc-3.0.12/modules/gui/qt/main_interface.cpp	2018-05-16 18:47:09.000000000 +0200
+++ vlc-3.0.16/modules/gui/qt/main_interface.cpp	2021-03-20 19:20:19.000000000 +0100
@@ -2,7 +2,7 @@
  * main_interface.cpp : Main interface
  ****************************************************************************
  * Copyright (C) 2006-2011 VideoLAN and AUTHORS
- * $Id: 259dcf7109ff245d520753f52c3e882d05b2ee07 $
+ * $Id: a57506533d635a67ca3fff0d9be35635eec11997 $
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
  *          Jean-Baptiste Kempf <jb@videolan.org>
@@ -1664,6 +1664,8 @@
 //  hide();
     if ( b_minimalView )
         setMinimalView( false );
+    if( videoWidget )
+        releaseVideoSlot();
     emit askToQuit(); /* ask THEDP to quit, so we have a unique method */
     /* Accept session quit. Otherwise we break the desktop mamager. */
     e->accept();
diff -Nru vlc-3.0.12/modules/gui/qt/qt.cpp vlc-3.0.16/modules/gui/qt/qt.cpp
--- vlc-3.0.12/modules/gui/qt/qt.cpp	2017-12-21 10:51:13.000000000 +0100
+++ vlc-3.0.16/modules/gui/qt/qt.cpp	2021-03-20 19:20:19.000000000 +0100
@@ -2,7 +2,7 @@
  * qt.cpp : Qt interface
  ****************************************************************************
  * Copyright © 2006-2009 the VideoLAN team
- * $Id: cbd197750ae0a2a4dc484ead9256535f0d58b2fe $
+ * $Id: eda27528978e4a357c515d49fd00824790ce97f4 $
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
  *          Jean-Baptiste Kempf <jb@videolan.org>
@@ -361,6 +361,7 @@
 
 #if defined (QT5_HAS_X11)
 # include <vlc_xlib.h>
+# include <QX11Info>
 
 static void *ThreadXCB( void *data )
 {
@@ -708,6 +709,15 @@
  */
 static int WindowControl( vout_window_t *, int i_query, va_list );
 
+typedef struct {
+    MainInterface *mi;
+#ifdef QT5_HAS_X11
+    Display *dpy;
+#endif
+    bool orphaned;
+    QMutex lock;
+} vout_window_qt_t;
+
 static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
 {
     if( cfg->is_standalone )
@@ -737,21 +747,78 @@
     if (unlikely(!active))
         return VLC_EGENERIC;
 
-    MainInterface *p_mi = p_intf->p_sys->p_mi;
+    vout_window_qt_t *sys = new vout_window_qt_t;
+
+    sys->mi = p_intf->p_sys->p_mi;
+    sys->orphaned = false;
+    p_wnd->sys = (vout_window_sys_t *)sys;
     msg_Dbg( p_wnd, "requesting video window..." );
 
-    if( !p_mi->getVideo( p_wnd, cfg->width, cfg->height, cfg->is_fullscreen ) )
+#ifdef QT5_HAS_X11
+    Window xid;
+
+    if (QX11Info::isPlatformX11())
+    {
+        sys->dpy = XOpenDisplay(NULL);
+        if (unlikely(sys->dpy == NULL))
+        {
+            delete sys;
+            return VLC_EGENERIC;
+        }
+
+        int snum = DefaultScreen(sys->dpy);
+        unsigned long black = BlackPixel(sys->dpy, snum);
+
+        xid = XCreateSimpleWindow(sys->dpy, RootWindow(sys->dpy, snum),
+                                  0, 0, cfg->width, cfg->height,
+                                  0, black, black);
+    }
+#endif
+
+    if (!sys->mi->getVideo(p_wnd, cfg->width, cfg->height, cfg->is_fullscreen))
+    {
+#ifdef QT5_HAS_X11
+        if (QX11Info::isPlatformX11())
+            XCloseDisplay(sys->dpy);
+#endif
+        delete sys;
         return VLC_EGENERIC;
+    }
 
+#ifdef QT5_HAS_X11
+    if (QX11Info::isPlatformX11())
+    {
+        QMutexLocker locker2(&sys->lock);
+
+        XReparentWindow(sys->dpy, xid, p_wnd->handle.xid, 0, 0);
+        XMapWindow(sys->dpy, xid);
+        XSync(sys->dpy, True);
+        p_wnd->handle.xid = xid;
+    }
+#endif
     p_wnd->info.has_double_click = true;
     p_wnd->control = WindowControl;
-    p_wnd->sys = (vout_window_sys_t*)p_mi;
     return VLC_SUCCESS;
 }
 
+void WindowResized(vout_window_t *wnd, const QSize& size)
+{
+#ifdef QT5_HAS_X11
+    vout_window_qt_t *sys = (vout_window_qt_t *)wnd->sys;
+
+    if (QX11Info::isPlatformX11())
+    {
+        XResizeWindow(sys->dpy, wnd->handle.xid, size.width(), size.height());
+        XClearWindow(sys->dpy, wnd->handle.xid);
+        XSync(sys->dpy, True);
+    }
+#endif
+    vout_window_ReportSize(wnd, size.width(), size.height());
+}
+
 static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args )
 {
-    MainInterface *p_mi = (MainInterface *)p_wnd->sys;
+    vout_window_qt_t *sys = (vout_window_qt_t *)p_wnd->sys;
     QMutexLocker locker (&lock);
 
     if (unlikely(!active))
@@ -759,12 +826,32 @@
         msg_Warn (p_wnd, "video already released before control");
         return VLC_EGENERIC;
     }
-    return p_mi->controlVideo( i_query, args );
+    return sys->mi->controlVideo(i_query, args);
+}
+
+void WindowReleased(vout_window_t *wnd)
+{
+    vout_window_qt_t *sys = (vout_window_qt_t *)wnd->sys;
+    QMutexLocker locker(&sys->lock);
+
+    msg_Warn(wnd, "orphaned video window");
+    sys->orphaned = true;
+#if defined (QT5_HAS_X11)
+    if (QX11Info::isPlatformX11())
+    {   /* In the unlikely event that WindowOpen() has not yet reparented the
+         * window, WindowOpen() will skip reparenting. Then this call will be
+         * a no-op.
+         */
+        XReparentWindow(sys->dpy, wnd->handle.xid,
+                        RootWindow(sys->dpy, DefaultScreen(sys->dpy)), 0, 0);
+        XSync(sys->dpy, True);
+    }
+#endif
 }
 
 static void WindowClose( vout_window_t *p_wnd )
 {
-    MainInterface *p_mi = (MainInterface *)p_wnd->sys;
+    vout_window_qt_t *sys = (vout_window_qt_t *)p_wnd->sys;
     QMutexLocker locker (&lock);
 
     /* Normally, the interface terminates after the video. In the contrary, the
@@ -776,11 +863,17 @@
      * That assumes the video output will behave sanely if it window is
      * destroyed asynchronously.
      * XCB and Xlib-XCB are fine with that. Plain Xlib wouldn't, */
-    if (unlikely(!active))
+    if (likely(active))
     {
-        msg_Warn (p_wnd, "video already released");
-        return;
+        msg_Dbg(p_wnd, "releasing video...");
+        sys->mi->releaseVideo();
     }
-    msg_Dbg (p_wnd, "releasing video...");
-    p_mi->releaseVideo();
+    else
+        msg_Warn (p_wnd, "video already released");
+
+#if defined (QT5_HAS_X11)
+    if (QX11Info::isPlatformX11())
+        XCloseDisplay(sys->dpy);
+#endif
+    delete sys;
 }
diff -Nru vlc-3.0.12/modules/gui/qt/ui/sprefs_subtitles.ui vlc-3.0.16/modules/gui/qt/ui/sprefs_subtitles.ui
--- vlc-3.0.12/modules/gui/qt/ui/sprefs_subtitles.ui	2017-11-24 16:29:17.000000000 +0100
+++ vlc-3.0.16/modules/gui/qt/ui/sprefs_subtitles.ui	2021-06-16 07:37:33.000000000 +0200
@@ -335,6 +335,7 @@
   <tabstop>OSDBox</tabstop>
   <tabstop>OSDTitleBox</tabstop>
   <tabstop>OSDTitlePos</tabstop>
+  <tabstop>spuActiveBox</tabstop>
   <tabstop>preferredLanguage</tabstop>
   <tabstop>encoding</tabstop>
   <tabstop>font</tabstop>
@@ -343,6 +344,7 @@
   <tabstop>effect</tabstop>
   <tabstop>outlineColor</tabstop>
   <tabstop>shadowCheck</tabstop>
+  <tabstop>backgroundCheck</tabstop>
   <tabstop>subsPosition</tabstop>
  </tabstops>
  <resources/>
diff -Nru vlc-3.0.12/modules/gui/qt/util/customwidgets.cpp vlc-3.0.16/modules/gui/qt/util/customwidgets.cpp
--- vlc-3.0.12/modules/gui/qt/util/customwidgets.cpp	2017-11-24 16:29:17.000000000 +0100
+++ vlc-3.0.16/modules/gui/qt/util/customwidgets.cpp	2021-04-06 11:39:25.000000000 +0200
@@ -3,7 +3,7 @@
  ****************************************************************************
  * Copyright (C) 2006-2011 the VideoLAN team
  * Copyright (C) 2004 Daniel Molkentin <molkentin@kde.org>
- * $Id: 3879cc350b8b08bf0597a756e6398aad83670986 $
+ * $Id: f8d2acf5e38e94a9f7e08c4cad334e1db86293f8 $
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
  * The "ClickLineEdit" control is based on code by  Daniel Molkentin
@@ -31,6 +31,7 @@
 #include "customwidgets.hpp"
 #include "qt.hpp"               /* needed for qtr,  but not necessary */
 
+#include <QtMath>  // for wheel deadzone calculation
 #include <QPainter>
 #include <QRect>
 #include <QKeyEvent>
@@ -297,13 +298,28 @@
 
 int qtWheelEventToVLCKey( QWheelEvent *e )
 {
-    int i_vlck = 0;
-    /* Handle modifiers */
-    i_vlck |= qtKeyModifiersToVLC( e );
-    if ( e->delta() > 0 )
-        i_vlck |= KEY_MOUSEWHEELUP;
-    else
-        i_vlck |= KEY_MOUSEWHEELDOWN;
+    const qreal v_cos_deadzone = 0.45; // ~63 degrees
+    const qreal h_cos_deadzone = 0.95; // ~15 degrees
+
+    int i_vlck = qtKeyModifiersToVLC(e);  // Handle modifiers
+
+    QPoint p = e->angleDelta();
+    if (!p.isNull())
+    {
+        qreal cos = qFabs(p.x())/qSqrt(qPow(p.x(), 2) + qPow(p.y(), 2));
+
+        if (cos < v_cos_deadzone)
+        {
+            if (p.y() > 0) i_vlck |= KEY_MOUSEWHEELUP;
+            else           i_vlck |= KEY_MOUSEWHEELDOWN;
+        }
+        else if (cos > h_cos_deadzone)
+        {
+            if (p.x() > 0) i_vlck |= KEY_MOUSEWHEELLEFT;
+            else           i_vlck |= KEY_MOUSEWHEELRIGHT;
+        }
+    }
+
     return i_vlck;
 }
 
diff -Nru vlc-3.0.12/modules/lua/vlc.h vlc-3.0.16/modules/lua/vlc.h
--- vlc-3.0.12/modules/lua/vlc.h	2017-11-24 16:29:18.000000000 +0100
+++ vlc-3.0.16/modules/lua/vlc.h	2021-03-20 19:20:19.000000000 +0100
@@ -2,7 +2,7 @@
  * vlc.h: VLC specific lua library functions.
  *****************************************************************************
  * Copyright (C) 2007-2008 the VideoLAN team
- * $Id: 71f381d334a07f5f9461a301b84c292a90ef844d $
+ * $Id: 8791ba57f930d70bc4c1941920667cd4bbdf69d1 $
  *
  * Authors: Antoine Cellerier <dionoea at videolan tod org>
  *          Pierre d'Herbemont <pdherbemont # videolan.org>
@@ -38,6 +38,7 @@
 #include <vlc_stream.h>
 #include <vlc_demux.h>
 
+#define LUA_COMPAT_APIINTCASTS /* luaL_checkint / luaL_optlong */
 #define LUA_COMPAT_MODULE
 #include <lua.h>        /* Low level lua C API */
 #include <lauxlib.h>    /* Higher level C API */
diff -Nru vlc-3.0.12/modules/meta_engine/folder.c vlc-3.0.16/modules/meta_engine/folder.c
--- vlc-3.0.12/modules/meta_engine/folder.c	2018-03-07 14:52:20.000000000 +0100
+++ vlc-3.0.16/modules/meta_engine/folder.c	2021-06-13 11:32:34.000000000 +0200
@@ -2,7 +2,7 @@
  * folder.c
  *****************************************************************************
  * Copyright (C) 2006 VLC authors and VideoLAN
- * $Id: aa25c8f945d11f71c503098efb9bf57b298ca748 $
+ * $Id: 7ab986d4199b8832a86a320568dbc29afd09dad9 $
  *
  * Authors: Antoine Cellerier <dionoea -at- videolan -dot- org>
  *
@@ -69,6 +69,8 @@
 vlc_module_begin ()
     set_shortname( N_( "Folder" ) )
     set_description( N_("Folder meta data") )
+    set_category( CAT_PLAYLIST )
+    set_subcategory( SUBCAT_PLAYLIST_GENERAL )
     add_loadfile( "album-art-filename", NULL,
         N_("Album art filename"), N_("Filename to look for album art in current directory"), false );
     set_capability( "art finder", 90 )
diff -Nru vlc-3.0.12/modules/misc/gnutls.c vlc-3.0.16/modules/misc/gnutls.c
--- vlc-3.0.12/modules/misc/gnutls.c	2020-07-27 10:31:07.000000000 +0200
+++ vlc-3.0.16/modules/misc/gnutls.c	2021-06-16 07:37:33.000000000 +0200
@@ -790,7 +790,7 @@
     add_bool("gnutls-system-trust", true, SYSTEM_TRUST_TEXT,
              SYSTEM_TRUST_LONGTEXT, true)
     add_string("gnutls-dir-trust", NULL, DIR_TRUST_TEXT,
-               DIR_TRUST_TEXT, true)
+               DIR_TRUST_LONGTEXT, true)
     add_string ("gnutls-priorities", "NORMAL", PRIORITIES_TEXT,
                 PRIORITIES_LONGTEXT, false)
         change_string_list (priorities_values, priorities_text)
diff -Nru vlc-3.0.12/modules/MODULES_LIST vlc-3.0.16/modules/MODULES_LIST
--- vlc-3.0.12/modules/MODULES_LIST	2020-02-15 13:08:28.000000000 +0100
+++ vlc-3.0.16/modules/MODULES_LIST	2021-04-18 15:17:50.000000000 +0200
@@ -14,6 +14,7 @@
  * access_output_file: File access_output module
  * access_output_http: HTTP Network access module
  * access_output_livehttp: Live HTTP stream output
+ * access_output_rist: RIST (Reliable Internet Stream Transport) access_output module
  * access_output_shout: Shoutcast access output
  * access_output_srt: SRT (Secure Reliable Transport) access_output module
  * access_output_udp: UDP Network access_output module
@@ -61,7 +62,6 @@
  * avcodec: libavcodec audio/video decoder
  * avformat: libavformat demuxer
  * avi: AVI file stream demuxer
- * av1: AV1 packetizer
  * avio: Access and Stream output module using libavformat network
  * ball: Augmented reality ball video filter module
  * bandlimited_resampler: Bandlimited interpolation audio resampler
@@ -94,6 +94,7 @@
  * cvpx: filter to copy from OS X accelerated surfaces to CPU
  * d3d11va: Direct3D11 hardware-accelerated decoding
  * daala: a daala video decoder/packetizer using libdaala
+ * dav1d: Dav1d decoder (AV1)
  * dbus: D-Bus control interface
  * dbus_screensaver: preventing the computer from suspending
  * dc1394: IIDC (DCAM) FireWire input module
@@ -290,6 +291,7 @@
  * oss: audio output module using the OSS /dev/dsp interface
  * osx_notifications: announce currently playing stream to OS X/Growl
  * packetizer_a52: A/52 basic parser/packetizer
+ * packetizer_av1: AV1 packetizer
  * packetizer_avparser: libavcodec packetizer
  * packetizer_copy: Simple copy packetizer
  * packetizer_dirac: Dirac video packetizer
@@ -331,6 +333,7 @@
  * remap: audio channel remapping filter
  * remoteosd: Remote-OSD over VNC
  * ripple: Ripple video effect
+ * rist: RIST (Reliable Internet Stream Transport) access module
  * rotate: Video rotation filter
  * rss: Display a RSS feed on the video output
  * rtp: rtp demux module
@@ -362,8 +365,8 @@
  * simple_channel_mixer: channel mixer
  * skins2: Skinnable interface, new generation
  * skiptags: APE & ID3 tags-skipping stream filter
- * smb: SMB shares access module
  * smb2: SMB2/3 access module
+ * smb: SMB shares access module
  * smf: Standard MIDI file demuxer
  * sndio: OpenBSD sndio audio output
  * soxr: SoX Resampler library audio filter
diff -Nru vlc-3.0.12/modules/packetizer/avparser.c vlc-3.0.16/modules/packetizer/avparser.c
--- vlc-3.0.12/modules/packetizer/avparser.c	2018-05-29 17:44:21.000000000 +0200
+++ vlc-3.0.16/modules/packetizer/avparser.c	2021-04-07 11:59:31.000000000 +0200
@@ -2,7 +2,7 @@
  * avparser.c
  *****************************************************************************
  * Copyright (C) 2015 VLC authors and VideoLAN
- * $Id: 1dfa9dffaf7308ea00dc771e23fbf80e59963d6d $
+ * $Id: 272f494b212440a05d2a90426d289274df8c2741 $
  *
  * Authors: Denis Charmet <typx@videolan.org>
  *
@@ -182,19 +182,57 @@
     if( unlikely( i_outlen <= 0 || !p_outdata ) )
         goto out;
 
-    block_t * p_ret = block_Alloc( i_outlen );
+    block_t * p_ret;
+    if( (size_t)i_outlen < p_block->i_buffer )
+    {
+        p_ret = block_Alloc( i_outlen );
+        if( unlikely ( !p_ret ) )
+            goto out;
+    }
+    else /* just pass block as-is */
+    {
+        p_ret = p_block;
+    }
 
-    if( unlikely ( !p_ret ) )
-        goto out;
+    if( p_ret != p_block )
+    {
+        p_ret->i_flags = p_block->i_flags;
+
+        if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY )
+            p_block->i_flags &= ~BLOCK_FLAG_DISCONTINUITY;
+
+        memcpy( p_ret->p_buffer, p_outdata, i_outlen );
+        p_ret->i_pts = p_block->i_pts;
+        p_ret->i_dts = p_block->i_dts;
+        p_block->i_pts = p_block->i_dts = VLC_TS_INVALID;
+    }
+    else /* as-is block is now used */
+    {
+        p_sys->i_offset = 0;
+        *pp_block = NULL;
+    }
+
+    if( p_dec->fmt_in.i_cat == VIDEO_ES )
+    {
+        switch ( p_sys->p_parser_ctx->pict_type )
+        {
+        case AV_PICTURE_TYPE_I:
+            p_ret->i_flags |= BLOCK_FLAG_TYPE_I;
+            break;
+        case AV_PICTURE_TYPE_P:
+            p_ret->i_flags |= BLOCK_FLAG_TYPE_P;
+            break;
+        case AV_PICTURE_TYPE_B:
+            p_ret->i_flags |= BLOCK_FLAG_TYPE_B;
+            break;
+        default:
+            break;
+        }
+    }
 
-    memcpy( p_ret->p_buffer, p_outdata, i_outlen );
-    p_ret->i_pts = p_block->i_pts;
-    p_ret->i_dts = p_block->i_dts;
     if( p_sys->p_parser_ctx->key_frame == 1 )
         p_ret->i_flags |= BLOCK_FLAG_TYPE_I;
 
-    p_block->i_pts = p_block->i_dts = VLC_TS_INVALID;
-
     return p_ret;
 
 out:
diff -Nru vlc-3.0.12/modules/packetizer/hevc.c vlc-3.0.16/modules/packetizer/hevc.c
--- vlc-3.0.12/modules/packetizer/hevc.c	2020-10-24 20:21:13.000000000 +0200
+++ vlc-3.0.16/modules/packetizer/hevc.c	2021-04-21 16:44:54.000000000 +0200
@@ -2,7 +2,7 @@
  * hevc.c: h.265/hevc video packetizer
  *****************************************************************************
  * Copyright (C) 2014 VLC authors and VideoLAN
- * $Id: c1742b890f031f58a5629ba6c27f6d45ad65446a $
+ * $Id: 8113658d04984006a72569cf4eafd6583c74617c $
  *
  * Authors: Denis Charmet <typx@videolan.org>
  *
@@ -553,10 +553,12 @@
             {
                 p_dec->fmt_out.video.i_frame_rate = num;
                 p_dec->fmt_out.video.i_frame_rate_base = den;
-                if(p_sys->dts.i_divider_den != den &&
-                   p_sys->dts.i_divider_num != 2 * num &&
-                   num <= UINT_MAX / 2)
+                if(num <= UINT_MAX / 2 &&
+                   (p_sys->dts.i_divider_den != den ||
+                    p_sys->dts.i_divider_num != 2 * num))
+                {
                     date_Change(&p_sys->dts, 2 * num, den);
+                }
             }
             p_dec->fmt_out.video.i_frame_rate = p_sys->dts.i_divider_num >> 1;
             p_dec->fmt_out.video.i_frame_rate_base = p_sys->dts.i_divider_den;
diff -Nru vlc-3.0.12/modules/stream_out/chromaprint.c vlc-3.0.16/modules/stream_out/chromaprint.c
--- vlc-3.0.12/modules/stream_out/chromaprint.c	2017-11-24 16:29:18.000000000 +0100
+++ vlc-3.0.16/modules/stream_out/chromaprint.c	2021-06-13 11:32:34.000000000 +0200
@@ -61,6 +61,8 @@
     set_description( N_("Chromaprint stream output") )
     set_capability( "sout stream", 0 )
     add_shortcut( "chromaprint" )
+    set_category( CAT_SOUT )
+    set_subcategory( SUBCAT_SOUT_STREAM )
     add_integer( "duration", 90, DURATION_TEXT, DURATION_LONGTEXT, true )
     set_callbacks( Open, Close )
 vlc_module_end ()
diff -Nru vlc-3.0.12/modules/stream_out/mosaic_bridge.c vlc-3.0.16/modules/stream_out/mosaic_bridge.c
--- vlc-3.0.12/modules/stream_out/mosaic_bridge.c	2017-11-24 16:29:18.000000000 +0100
+++ vlc-3.0.16/modules/stream_out/mosaic_bridge.c	2021-06-13 11:32:34.000000000 +0200
@@ -2,7 +2,7 @@
  * mosaic_bridge.c:
  *****************************************************************************
  * Copyright (C) 2004-2007 VLC authors and VideoLAN
- * $Id: e0f9ff4c8fee5a0bac93fb2ece6471d7a914dcbf $
+ * $Id: bffe28738bc4b02c96f269c068b65f1acd34e38b $
  *
  * Authors: Antoine Cellerier <dionoea@videolan.org>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -141,6 +141,9 @@
     set_capability( "sout stream", 0 )
     add_shortcut( "mosaic-bridge" )
 
+    set_category( CAT_SOUT )
+    set_subcategory( SUBCAT_SOUT_STREAM )
+
     add_string( CFG_PREFIX "id", "Id", ID_TEXT, ID_LONGTEXT,
                 false )
     add_integer( CFG_PREFIX "width", 0, WIDTH_TEXT,
diff -Nru vlc-3.0.12/modules/stream_out/transcode/transcode.c vlc-3.0.16/modules/stream_out/transcode/transcode.c
--- vlc-3.0.12/modules/stream_out/transcode/transcode.c	2018-01-22 10:05:49.000000000 +0100
+++ vlc-3.0.16/modules/stream_out/transcode/transcode.c	2021-06-16 07:37:33.000000000 +0200
@@ -2,7 +2,7 @@
  * transcode.c: transcoding stream output module
  *****************************************************************************
  * Copyright (C) 2003-2009 VLC authors and VideoLAN
- * $Id: c92dd4a9743620e91ca364afaf99b4c39d944b1d $
+ * $Id: 0c3fe91b9a54f6a27dac03fbd7699a52ce3e66a9 $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@videolan.org>
@@ -205,7 +205,7 @@
                 SCODEC_LONGTEXT, false )
     add_bool( SOUT_CFG_PREFIX "soverlay", false, SCODEC_TEXT,
                SCODEC_LONGTEXT, false )
-    add_module_list( SOUT_CFG_PREFIX "sfilter", "spu source",
+    add_module_list( SOUT_CFG_PREFIX "sfilter", "sub source",
                      NULL, SFILTER_TEXT, SFILTER_LONGTEXT, false )
 
     set_section( N_("Miscellaneous"), NULL )
diff -Nru vlc-3.0.12/modules/text_renderer/freetype/text_layout.c vlc-3.0.16/modules/text_renderer/freetype/text_layout.c
--- vlc-3.0.12/modules/text_renderer/freetype/text_layout.c	2020-10-24 20:21:13.000000000 +0200
+++ vlc-3.0.16/modules/text_renderer/freetype/text_layout.c	2021-05-26 10:46:20.000000000 +0200
@@ -2,7 +2,7 @@
  * text_layout.c : Text shaping and layout
  *****************************************************************************
  * Copyright (C) 2015 VLC authors and VideoLAN
- * $Id: 4dce1e30ba4a2de7468ae59b3c395ee3ea52898e $
+ * $Id: fc2db46e62ac89b221df4c2c4574a4bf878f48de $
  *
  * Authors: Salah-Eddin Shaban <salshaaban@gmail.com>
  *          Laurent Aimar <fenrir@videolan.org>
@@ -1060,8 +1060,8 @@
             if( p_filter->p_sys->p_stroker && (p_style->i_style_flags & STYLE_OUTLINE) )
             {
                 p_bitmaps->p_outline = p_bitmaps->p_glyph;
-                if( FT_Glyph_StrokeBorder( &p_bitmaps->p_outline,
-                                           p_filter->p_sys->p_stroker, 0, 0 ) )
+                if( FT_Glyph_Stroke( &p_bitmaps->p_outline,
+                                      p_filter->p_sys->p_stroker, 0 ) )
                     p_bitmaps->p_outline = 0;
             }
 
diff -Nru vlc-3.0.12/modules/text_renderer/svg.c vlc-3.0.16/modules/text_renderer/svg.c
--- vlc-3.0.12/modules/text_renderer/svg.c	2017-11-24 16:29:18.000000000 +0100
+++ vlc-3.0.16/modules/text_renderer/svg.c	2021-06-13 11:32:34.000000000 +0200
@@ -2,7 +2,7 @@
  * svg.c : Put SVG on the video
  *****************************************************************************
  * Copyright (C) 2002, 2003 VLC authors and VideoLAN
- * $Id: 71fe7e54579ef886ba554ea000958b8737b21737 $
+ * $Id: b1247af0ca26090f1e067065bf0adf3ca1086b05 $
  *
  * Authors: Olivier Aubert <oaubert@lisi.univ-lyon1.fr>
  *
@@ -73,7 +73,7 @@
 
 vlc_module_begin ()
     set_category( CAT_INPUT )
-    set_category( SUBCAT_INPUT_SCODEC )
+    set_subcategory( SUBCAT_INPUT_SCODEC )
     set_capability( "text renderer", 99 )
     add_shortcut( "svg" )
     add_string( "svg-template-file", "", TEMPLATE_TEXT, TEMPLATE_LONGTEXT, true )
diff -Nru vlc-3.0.12/NEWS vlc-3.0.16/NEWS
--- vlc-3.0.12/NEWS	2021-01-17 21:31:56.000000000 +0100
+++ vlc-3.0.16/NEWS	2021-06-18 22:37:13.000000000 +0200
@@ -1,3 +1,99 @@
+Changes between 3.0.15 and 3.0.16:
+----------------------------------
+
+Video Output:
+ * Fix a D3D11 crash on Windows 8/8.1
+
+Access:
+ * Fix RTSP server timeout handling
+
+Interfaces:
+ * macOS: Add touchbar support
+
+Misc
+ * Multiple settings improvements
+
+Changes between 3.0.14 and 3.0.15:
+----------------------------------
+
+Core:
+ * Add Opus & Alac wave format mappings
+
+Access:
+ * Fix opening DVD folders with non-ascii characters
+
+Demux:
+ * Fix asf regression with broadcast streams
+ * MP4: Fix audio drop on seek
+
+Video Output:
+ * Fix seek & volume sliders overlapping with subtitles
+ * Fix delays when seeking with D3D11
+
+Text renderer:
+ * Improve freetype fonts outlining
+
+Misc:
+ * Fix GnuTLS support for Windows XP
+
+Changes between 3.0.13 and 3.0.14:
+----------------------------------
+
+Core:
+ * Fix double loading of slave input
+ * Fix an issue causing the auto-updater not to launch the new version
+   installer
+
+Changes between 3.0.12.1 and 3.0.13:
+----------------------------------
+
+Demux:
+ * Adaptive: fix artefacts in HLS streams with wrong profiles/levels
+ * Fix regression on some MP4 files for the audio track
+ * Fix MPGA and ADTS probing in TS files
+ * Fix Flac inside AVI files
+ * Fix VP9/Webm artefacts when seeking
+
+Codec:
+ * Support SSA text scaling
+ * Fix rotation on Android rotation
+ * Fix WebVTT subtitles that start at 00:00
+
+Access:
+ * Update libnfs to support NFSv4
+ * Improve SMB2 integration
+ * Fix Blu-ray files using Unicode names on Windows
+ * Disable mcast lookups on Android for RTSP playback
+
+Video Output:
+ * Rework the D3D11 rendering wait, to fix choppiness on display
+
+Interfaces:
+ * Fix VLC getting stuck on close on X11 (#21875)
+ * Improve RTL on preferences on macOS
+ * Add mousewheel horizontal axis control
+ * Fix crash on exit on macOS
+ * Fix sizing of the fullscreen controls on macOS
+
+Windows:
+ * Fix subtitles/OSD under Windows XP
+
+Misc:
+ * Update translations
+ * Improve MIDI fonts search on Linux
+ * Update Soundcloud, Youtube, liveleak
+ * Fix compilation with GCC11
+ * Fix input-slave option for subtitles
+
+
+Changes between 3.0.12 and 3.0.12.1:
+----------------------------------
+
+macOS:
+ * 3.0.12.1 is the first release for Apple Silicon macs
+ * Version bump to allow an automatic upgrade path
+
+
 Changes between 3.0.11.1 and 3.0.12:
 ----------------------------------
 
@@ -9,6 +105,9 @@
 
 Demux:
  * Fixed adaptive's handling of resolution settings
+ * Improve Bluray tracks support
+ * Improve WMV seeking and DASH support
+ * Fix crashes in AVI, MKV modules
 
 Audio output:
  * Fix audio distortion on macOS during start of playback
@@ -27,6 +126,9 @@
  * Several fixes in the web interface, including privacy and security
    improvements
  * Update YouTube and Vocaroo scripts
+ * Fix rotation filter mouse handling
+ * Update translations
+
 
 Changes between 3.0.11 and 3.0.11.1:
 ----------------------------------
@@ -56,6 +158,7 @@
  * Updated libmatroska to 1.6.0
  * Updated mpg123 to 1.26.2
 
+
 Changes between 3.0.10 and 3.0.11:
 ----------------------------------
 
@@ -90,6 +193,7 @@
 Misc:
  * Update Youtube script
 
+
 Changes between 3.0.9.2 and 3.0.10:
 ----------------------------------
 
diff -Nru vlc-3.0.12/share/lua/playlist/liveleak.lua vlc-3.0.16/share/lua/playlist/liveleak.lua
--- vlc-3.0.12/share/lua/playlist/liveleak.lua	2017-11-24 16:29:18.000000000 +0100
+++ vlc-3.0.16/share/lua/playlist/liveleak.lua	2021-04-05 12:25:54.000000000 +0200
@@ -1,7 +1,7 @@
 --[[
  $Id$
 
- Copyright © 2012, 2017 VideoLAN and AUTHORS
+ Copyright © 2012, 2017, 2021 VideoLAN and AUTHORS
 
  Authors: Ludovic Fauvet <etix@videolan.org>
           Pierre Ynard
@@ -23,14 +23,10 @@
 
 -- Probe function.
 function probe()
-    return ( vlc.access == "http" or vlc.access == "https" )
-        and string.match( vlc.path, "^www%.liveleak%.com/view" )
-end
-
--- Util function
-function find( haystack, needle )
-    local _,_,r = string.find( haystack, needle )
-    return r
+    return ( vlc.access == "http" or vlc.access == "https" ) and (
+               string.match( vlc.path, "^www%.liveleak%.com/v%?" )
+            or string.match( vlc.path, "^www%.liveleak%.com/view%?" )
+           )
 end
 
 -- Parse function.
@@ -45,9 +41,16 @@
         if not line then break end
 
         -- Try to find the title
-        if string.match( line, '<span class="section_title"' ) then
-            title = find( line, '<span class="section_title"[^>]*>(.-)<' )
-            title = vlc.strings.resolve_xml_special_chars( title )
+        if not title then
+            title = string.match( line, "shareTitle: *'(.-[^\\])'" )
+            if title then
+                if string.match( title, "^'" ) then
+                    title = nil
+                else
+                    -- FIXME: do this properly (see #24958)
+                    title = string.gsub( title, "\\'", "'" )
+                end
+            end
         end
 
         -- Try to find the art
@@ -56,18 +59,27 @@
         end
 
         -- Try to find the video
-        if not video and string.match( line, '<source ' ) then
+        if not video and string.match( line, '<video ' ) then
+            while not string.match( line, '</video>') do
+                local more = vlc.readline()
+                if not more then break end
+                line = line..more
+            end
+
             -- Apparently the two formats are listed HD first, SD second
             local prefres = vlc.var.inherit( nil, 'preferred-resolution' )
-            for src in string.gmatch( line, '<source src="([^"]+)"' ) do
-                video = src
-
-                if prefres < 0 then
-                    break
-                end
-                local height = tonumber( string.match( src, '_(%d+)p%.mp4' ) )
-                if ( not height ) or height <= prefres then
-                    break
+            for source in string.gmatch( line, '<source( .-)>' ) do
+                local src = string.match( source, ' src="([^"]+)"' )
+                if src then
+                    video = vlc.strings.resolve_xml_special_chars( src )
+
+                    if prefres < 0 then
+                        break
+                    end
+                    local height = tonumber( string.match( source, ' label="(%d+).-"' ) )
+                    if ( not height ) or height <= prefres then
+                        break
+                    end
                 end
             end
         end
diff -Nru vlc-3.0.12/share/lua/playlist/soundcloud.lua vlc-3.0.16/share/lua/playlist/soundcloud.lua
--- vlc-3.0.12/share/lua/playlist/soundcloud.lua	2020-04-01 11:12:42.000000000 +0200
+++ vlc-3.0.16/share/lua/playlist/soundcloud.lua	2021-03-20 19:20:19.000000000 +0100
@@ -45,18 +45,18 @@
         return nil
     end
 
-    while true do
-        local line = s:readline()
-        if not line then break end
+    local line = s:read( 4096*1024 )
+    if not line then
+        return nil
+    end
 
-        -- The API magic appears under a similar form several times
-        -- in one of the javascript assets
-        -- {client_id:"z21TN9SfM0GjGteSzk4ViM1KEwMRNWZF"}
-        local client_id = string.match( line, '[{,]client_id:"(%w+)"[},]' )
-        if client_id then
-            vlc.msg.dbg( "Found soundcloud API magic" )
-            return client_id
-        end
+    -- The API magic appears under a similar form several times
+    -- in one of the javascript assets
+    -- {client_id:"z21TN9SfM0GjGteSzk4ViM1KEwMRNWZF"}
+    local client_id = string.match( line, '[{,]client_id:"(%w+)"[},]' )
+    if client_id then
+        vlc.msg.dbg( "Found soundcloud API magic" )
+        return client_id
     end
     return nil
 end
diff -Nru vlc-3.0.12/share/lua/playlist/youtube.lua vlc-3.0.16/share/lua/playlist/youtube.lua
--- vlc-3.0.12/share/lua/playlist/youtube.lua	2021-01-17 21:31:01.000000000 +0100
+++ vlc-3.0.16/share/lua/playlist/youtube.lua	2021-04-05 12:25:54.000000000 +0200
@@ -303,8 +303,8 @@
 
 -- Probe function.
 function probe()
-    return ( ( vlc.access == "http" or vlc.access == "https" )
-             and (
+    return ( ( vlc.access == "http" or vlc.access == "https" ) and (
+            ((
                string.match( vlc.path, "^www%.youtube%.com/" )
             or string.match( vlc.path, "^music%.youtube%.com/" )
             or string.match( vlc.path, "^gaming%.youtube%.com/" ) -- out of use
@@ -315,14 +315,27 @@
             or string.match( vlc.path, "/get_video_info%?" ) -- info API
             or string.match( vlc.path, "/v/" ) -- video in swf player
             or string.match( vlc.path, "/embed/" ) -- embedded player iframe
-             ) )
+             )) or
+               string.match( vlc.path, "^consent%.youtube%.com/" )
+         ) )
 end
 
 -- Parse function.
 function parse()
-    if not string.match( vlc.path, "^www%.youtube%.com/" ) then
+    if string.match( vlc.path, "^consent%.youtube%.com/" ) then
+        -- Cookie consent redirection
+        -- Location: https://consent.youtube.com/m?continue=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXXXXXXXXXXX&gl=FR&m=0&pc=yt&uxe=23983172&hl=fr&src=1
+        -- Set-Cookie: CONSENT=PENDING+355; expires=Fri, 01-Jan-2038 00:00:00 GMT; path=/; domain=.youtube.com
+        local url = get_url_param( vlc.path, "continue" )
+        if not url then
+            vlc.msg.err( "Couldn't handle YouTube cookie consent redirection, please check for updates to this script or try disabling HTTP cookie forwarding" )
+            return { }
+        end
+        return { { path = vlc.strings.decode_uri( url ), options = { ":no-http-forward-cookies" } } }
+    elseif not string.match( vlc.path, "^www%.youtube%.com/" ) then
         -- Skin subdomain
         return { { path = vlc.access.."://"..string.gsub( vlc.path, "^([^/]*)/", "www.youtube.com/" ) } }
+
     elseif string.match( vlc.path, "/watch%?" )
         or string.match( vlc.path, "/live$" )
         or string.match( vlc.path, "/live%?" )
diff -Nru vlc-3.0.12/src/input/es_out_timeshift.c vlc-3.0.16/src/input/es_out_timeshift.c
--- vlc-3.0.12/src/input/es_out_timeshift.c	2018-02-19 16:53:40.000000000 +0100
+++ vlc-3.0.16/src/input/es_out_timeshift.c	2021-03-31 12:00:12.000000000 +0200
@@ -2,7 +2,7 @@
  * es_out_timeshift.c: Es Out timeshift.
  *****************************************************************************
  * Copyright (C) 2008 Laurent Aimar
- * $Id: e30f9239587ff44a51907c43367372c1e8eb434b $
+ * $Id: bfa9697e95e8a7df8aa247ab05b852a735873ab2 $
  *
  * Authors: Laurent Aimar < fenrir _AT_ videolan _DOT_ org>
  *
@@ -913,7 +913,7 @@
     bool b_cmd;
 
     vlc_mutex_lock( &p_ts->lock );
-    b_cmd =  TsStorageIsEmpty( p_ts->p_storage_r );
+    b_cmd = !TsStorageIsEmpty( p_ts->p_storage_r );
     vlc_mutex_unlock( &p_ts->lock );
 
     return b_cmd;
diff -Nru vlc-3.0.12/src/input/input.c vlc-3.0.16/src/input/input.c
--- vlc-3.0.12/src/input/input.c	2020-02-18 10:36:34.000000000 +0100
+++ vlc-3.0.16/src/input/input.c	2021-05-09 12:14:47.000000000 +0200
@@ -2,7 +2,7 @@
  * input.c: input thread
  *****************************************************************************
  * Copyright (C) 1998-2007 VLC authors and VideoLAN
- * $Id: c139964f62d634471e8b3f9433f3d7c95fe644c3 $
+ * $Id: f8c0cf796c7a9014411bef4af4f200b8682a2c8c $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Laurent Aimar <fenrir@via.ecp.fr>
@@ -1058,8 +1058,28 @@
         if( uri == NULL )
             continue;
 
+        vlc_url_t parsed_uri;
+        if ( vlc_UrlParse( &parsed_uri, uri ) != VLC_SUCCESS )
+        {
+            msg_Err( p_input,
+                    "Invalid url passed to the \"input-slave\" option" );
+            vlc_UrlClean( &parsed_uri );
+            free( uri );
+            continue;
+        }
+
+        enum slave_type i_type;
+        if ( !input_item_slave_GetType( parsed_uri.psz_path, &i_type ) )
+        {
+            msg_Warn( p_input,
+                     "Can't deduce slave type of `%s\" with file extension.",
+                     uri );
+            i_type = SLAVE_TYPE_AUDIO;
+        }
         input_item_slave_t *p_slave =
-            input_item_slave_New( uri, SLAVE_TYPE_AUDIO, SLAVE_PRIORITY_USER );
+            input_item_slave_New( uri, i_type, SLAVE_PRIORITY_USER );
+
+        vlc_UrlClean( &parsed_uri );
         free( uri );
 
         if( unlikely( p_slave == NULL ) )
@@ -1128,6 +1148,9 @@
         free( psz_autopath );
     }
 
+    /* Add slaves from the "input-slave" option */
+    GetVarSlaves( p_input, &pp_slaves, &i_slaves );
+
     /* Add slaves found by the directory demuxer or via libvlc */
     input_item_t *p_item = input_priv(p_input)->p_item;
     vlc_mutex_lock( &p_item->lock );
@@ -1145,9 +1168,6 @@
     TAB_CLEAN( p_item->i_slaves, p_item->pp_slaves );
     vlc_mutex_unlock( &p_item->lock );
 
-    /* Add slaves from the "input-slave" option */
-    GetVarSlaves( p_input, &pp_slaves, &i_slaves );
-
     if( i_slaves > 0 )
         qsort( pp_slaves, i_slaves, sizeof (input_item_slave_t*),
                SlaveCompare );
diff -Nru vlc-3.0.12/src/libvlc-module.c vlc-3.0.16/src/libvlc-module.c
--- vlc-3.0.12/src/libvlc-module.c	2020-01-15 15:27:28.000000000 +0100
+++ vlc-3.0.16/src/libvlc-module.c	2021-06-16 07:37:33.000000000 +0200
@@ -2,7 +2,7 @@
  * libvlc-module.c: Options for the core (libvlc itself) module
  *****************************************************************************
  * Copyright (C) 1998-2009 VLC authors and VideoLAN
- * $Id: 79dfb9d5aec2e864d7c69c2461edf5b825148d2c $
+ * $Id: 231a3e572ee2105314d2ae77f3575dc5955ddee9 $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -1829,7 +1829,7 @@
                  SOCKS_SERVER_TEXT, SOCKS_SERVER_LONGTEXT, true )
     add_string( "socks-user", NULL,
                  SOCKS_USER_TEXT, SOCKS_USER_LONGTEXT, true )
-    add_string( "socks-pwd", NULL,
+    add_password( "socks-pwd", NULL,
                  SOCKS_PASS_TEXT, SOCKS_PASS_LONGTEXT, true )
 
 
diff -Nru vlc-3.0.12/src/misc/update.c vlc-3.0.16/src/misc/update.c
--- vlc-3.0.12/src/misc/update.c	2020-07-27 10:31:07.000000000 +0200
+++ vlc-3.0.16/src/misc/update.c	2021-05-10 16:02:36.000000000 +0200
@@ -2,7 +2,7 @@
  * update.c: VLC update checking and downloading
  *****************************************************************************
  * Copyright © 2005-2008 VLC authors and VideoLAN
- * $Id: 6c5a231bce0219224e1359dff5d639bb26885680 $
+ * $Id: b7e1420dfacf7365ea5ef0a2bb5d93693c4045b8 $
  *
  * Authors: Antoine Cellerier <dionoea -at- videolan -dot- org>
  *          Rémi Duraffort <ivoire at via.ecp.fr>
@@ -728,7 +728,7 @@
                                            psz_msg );
     if(answer == 1)
     {
-#ifndef VLC_WINSTORE_APP
+#if !VLC_WINSTORE_APP
         wchar_t psz_wdestfile[MAX_PATH];
         MultiByteToWideChar( CP_UTF8, 0, psz_destfile, -1, psz_wdestfile, MAX_PATH );
         answer = (int)ShellExecuteW( NULL, L"open", psz_wdestfile, NULL, NULL, SW_SHOW);
diff -Nru vlc-3.0.12/src/misc/update_crypto.c vlc-3.0.16/src/misc/update_crypto.c
--- vlc-3.0.12/src/misc/update_crypto.c	2019-05-23 19:09:47.000000000 +0200
+++ vlc-3.0.16/src/misc/update_crypto.c	2021-04-27 15:18:39.000000000 +0200
@@ -2,7 +2,7 @@
  * update_crypto.c: OpenPGP related functions used for updating
  *****************************************************************************
  * Copyright © 2008-2009 VLC authors and VideoLAN
- * $Id: 87800d11a403d4bfe72fae56bef3c19ff6c6d72f $
+ * $Id: 09479468c00337ddadd44f27e6cbee6428a28ed5 $
  *
  * Authors: Rafaël Carré <funman@videolanorg>
  *
@@ -54,7 +54,7 @@
 #define packet_header_len( c ) ( ( c & 0x03 ) + 1 ) /* number of bytes in a packet header */
 
 
-static inline int scalar_number( const uint8_t *p, int header_len )
+static inline uint32_t scalar_number( const uint8_t *p, int header_len )
 {
     assert( header_len == 1 || header_len == 2 || header_len == 4 );
 
@@ -63,14 +63,14 @@
     else if( header_len == 2 )
         return( (p[0] << 8) + p[1] );
     else if( header_len == 4 )
-        return( (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3] );
+        return( ((uint32_t)p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3] );
     else
         abort();
 }
 
 
 /* number of data bytes in a MPI */
-static int mpi_len(const uint8_t *mpi)
+static uint32_t mpi_len(const uint8_t *mpi)
 {
     return (scalar_number(mpi, 2) + 7) / 8;
 }
@@ -482,15 +482,15 @@
     gcry_sexp_t key_sexp, hash_sexp, sig_sexp;
     key_sexp = hash_sexp = sig_sexp = NULL;
 
-    int i_n_len = mpi_len( p_key->sig.rsa.n );
-    int i_e_len = mpi_len( p_key->sig.rsa.e );
+    size_t i_e_len = mpi_len( p_key->sig.rsa.e );
+    size_t i_n_len = mpi_len( p_key->sig.rsa.n );
     if( gcry_mpi_scan( &n, GCRYMPI_FMT_USG, p_key->sig.rsa.n + 2, i_n_len, NULL ) ||
         gcry_mpi_scan( &e, GCRYMPI_FMT_USG, p_key->sig.rsa.e + 2, i_e_len, NULL ) ||
         gcry_sexp_build( &key_sexp, &erroff, key_sexp_s, n, e ) )
         goto out;
 
     uint8_t *p_s = sign->algo_specific.rsa.s;
-    int i_s_len = mpi_len( p_s );
+    size_t i_s_len = mpi_len( p_s );
     if( gcry_mpi_scan( &s, GCRYMPI_FMT_USG, p_s + 2, i_s_len, NULL ) ||
         gcry_sexp_build( &sig_sexp, &erroff, sig_sexp_s, s ) )
         goto out;
@@ -536,10 +536,10 @@
     gcry_sexp_t key_sexp, hash_sexp, sig_sexp;
     key_sexp = hash_sexp = sig_sexp = NULL;
 
-    int i_p_len = mpi_len( p_key->sig.dsa.p );
-    int i_q_len = mpi_len( p_key->sig.dsa.q );
-    int i_g_len = mpi_len( p_key->sig.dsa.g );
-    int i_y_len = mpi_len( p_key->sig.dsa.y );
+    size_t i_p_len = mpi_len( p_key->sig.dsa.p );
+    size_t i_q_len = mpi_len( p_key->sig.dsa.q );
+    size_t i_g_len = mpi_len( p_key->sig.dsa.g );
+    size_t i_y_len = mpi_len( p_key->sig.dsa.y );
     if( gcry_mpi_scan( &p, GCRYMPI_FMT_USG, p_key->sig.dsa.p + 2, i_p_len, NULL ) ||
         gcry_mpi_scan( &q, GCRYMPI_FMT_USG, p_key->sig.dsa.q + 2, i_q_len, NULL ) ||
         gcry_mpi_scan( &g, GCRYMPI_FMT_USG, p_key->sig.dsa.g + 2, i_g_len, NULL ) ||
@@ -549,14 +549,14 @@
 
     uint8_t *p_r = sign->algo_specific.dsa.r;
     uint8_t *p_s = sign->algo_specific.dsa.s;
-    int i_r_len = mpi_len( p_r );
-    int i_s_len = mpi_len( p_s );
+    size_t i_r_len = mpi_len( p_r );
+    size_t i_s_len = mpi_len( p_s );
     if( gcry_mpi_scan( &r, GCRYMPI_FMT_USG, p_r + 2, i_r_len, NULL ) ||
         gcry_mpi_scan( &s, GCRYMPI_FMT_USG, p_s + 2, i_s_len, NULL ) ||
         gcry_sexp_build( &sig_sexp, &erroff, sig_sexp_s, r, s ) )
         goto out;
 
-    int i_hash_len = gcry_md_get_algo_dlen (sign->digest_algo);
+    unsigned int i_hash_len = gcry_md_get_algo_dlen (sign->digest_algo);
     if (i_hash_len > i_q_len)
         i_hash_len = i_q_len;
     if( gcry_mpi_scan( &hash, GCRYMPI_FMT_USG, p_hash, i_hash_len, NULL ) ||
@@ -648,7 +648,7 @@
             ( i_header_len != 1 && i_header_len != 2 && i_header_len != 4 ) )
             goto error;
 
-        int i_packet_len = scalar_number( pos, i_header_len );
+        size_t i_packet_len = scalar_number( pos, i_header_len );
         pos += i_header_len;
 
         if( pos + i_packet_len > max_pos )
diff -Nru vlc-3.0.12/src/network/httpd.c vlc-3.0.16/src/network/httpd.c
--- vlc-3.0.12/src/network/httpd.c	2020-11-09 15:42:20.000000000 +0100
+++ vlc-3.0.16/src/network/httpd.c	2021-06-18 09:14:43.000000000 +0200
@@ -3,7 +3,7 @@
  *****************************************************************************
  * Copyright (C) 2004-2006 VLC authors and VideoLAN
  * Copyright © 2004-2007 Rémi Denis-Courmont
- * $Id: 69e639948330378388f1103698e75796139023a4 $
+ * $Id: f5df06ccf669ed3de386771c323c74d4cd90ec5c $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Rémi Denis-Courmont
@@ -96,6 +96,7 @@
     bool           b_no_timeout;
     int            i_client;
     httpd_client_t **client;
+    unsigned timeout_sec;
 
     /* TLS data */
     vlc_tls_creds_t *p_tls;
@@ -146,8 +147,7 @@
     bool    b_stream_mode;
     uint8_t i_state;
 
-    mtime_t i_activity_date;
-    mtime_t i_activity_timeout;
+    mtime_t i_timeout_date;
 
     /* buffer for reading header */
     int     i_buffer_size;
@@ -860,12 +860,13 @@
  *****************************************************************************/
 static void* httpd_HostThread(void *);
 static httpd_host_t *httpd_HostCreate(vlc_object_t *, const char *,
-                                       const char *, vlc_tls_creds_t *);
+                                      const char *, vlc_tls_creds_t *,
+                                      unsigned);
 
 /* create a new host */
 httpd_host_t *vlc_http_HostNew(vlc_object_t *p_this)
 {
-    return httpd_HostCreate(p_this, "http-host", "http-port", NULL);
+    return httpd_HostCreate(p_this, "http-host", "http-port", NULL, 10);
 }
 
 httpd_host_t *vlc_https_HostNew(vlc_object_t *obj)
@@ -889,12 +890,13 @@
     free(key);
     free(cert);
 
-    return httpd_HostCreate(obj, "http-host", "https-port", tls);
+    return httpd_HostCreate(obj, "http-host", "https-port", tls, 10);
 }
 
 httpd_host_t *vlc_rtsp_HostNew(vlc_object_t *p_this)
 {
-    return httpd_HostCreate(p_this, "rtsp-host", "rtsp-port", NULL);
+    unsigned timeout = var_InheritInteger(p_this, "rtsp-timeout");
+    return httpd_HostCreate(p_this, "rtsp-host", "rtsp-port", NULL, timeout);
 }
 
 static struct httpd
@@ -908,7 +910,8 @@
 static httpd_host_t *httpd_HostCreate(vlc_object_t *p_this,
                                        const char *hostvar,
                                        const char *portvar,
-                                       vlc_tls_creds_t *p_tls)
+                                       vlc_tls_creds_t *p_tls,
+                                       unsigned timeout_sec)
 {
     httpd_host_t *host;
     unsigned port = var_InheritInteger(p_this, portvar);
@@ -968,6 +971,7 @@
     host->url      = NULL;
     host->i_client = 0;
     host->client   = NULL;
+    host->timeout_sec = timeout_sec;
     host->p_tls    = p_tls;
 
     /* create the thread */
@@ -1184,11 +1188,9 @@
     msg->i_headers++;
 }
 
-static void httpd_ClientInit(httpd_client_t *cl, mtime_t now)
+static void httpd_ClientInit(httpd_client_t *cl)
 {
     cl->i_state = HTTPD_CLIENT_RECEIVING;
-    cl->i_activity_date = now;
-    cl->i_activity_timeout = INT64_C(10000000);
     cl->i_buffer_size = HTTPD_CL_BUFSIZE;
     cl->i_buffer = 0;
     cl->p_buffer = xmalloc(cl->i_buffer_size);
@@ -1219,7 +1221,7 @@
     free(cl);
 }
 
-static httpd_client_t *httpd_ClientNew(vlc_tls_t *sock, mtime_t now)
+static httpd_client_t *httpd_ClientNew(vlc_tls_t *sock)
 {
     httpd_client_t *cl = malloc(sizeof(httpd_client_t));
 
@@ -1229,7 +1231,7 @@
     cl->sock    = sock;
     cl->url     = NULL;
 
-    httpd_ClientInit(cl, now);
+    httpd_ClientInit(cl);
     return cl;
 }
 
@@ -1559,10 +1561,6 @@
         return 0;
     }
 
-    /* XXX: for QT I have to disable timeout. Try to find why */
-    if (cl->query.i_proto == HTTPD_PROTO_RTSP)
-        cl->i_activity_timeout = 0;
-
     return 0;
 }
 
@@ -1737,8 +1735,8 @@
 
         if (cl->i_ref < 0 || (cl->i_ref == 0 &&
                     (cl->i_state == HTTPD_CLIENT_DEAD ||
-                      (cl->i_activity_timeout > 0 &&
-                        cl->i_activity_date+cl->i_activity_timeout < now)))) {
+                      (host->timeout_sec > 0 &&
+                        cl->i_timeout_date < now)))) {
             TAB_REMOVE(host->i_client, host->client, cl);
             i_client--;
             httpd_ClientDestroy(cl);
@@ -1746,7 +1744,7 @@
         }
 
         if (val == 0) {
-            cl->i_activity_date = now;
+            cl->i_timeout_date = now + (host->timeout_sec * 1000 * 1000);
             delay = 0;
         }
 
@@ -2035,13 +2033,14 @@
             sk = tls;
         }
 
-        cl = httpd_ClientNew(sk, now);
+        cl = httpd_ClientNew(sk);
         if (host->b_no_timeout)
-            cl->i_activity_timeout = 0;
+            host->timeout_sec = 0;
 
         if (host->p_tls != NULL)
             cl->i_state = HTTPD_CLIENT_TLS_HS_OUT;
 
+        cl->i_timeout_date = now + (host->timeout_sec * 1000 * 1000);
         TAB_APPEND(host->i_client, host->client, cl);
     }
 
diff -Nru vlc-3.0.12/src/posix/thread.c vlc-3.0.16/src/posix/thread.c
--- vlc-3.0.12/src/posix/thread.c	2017-12-21 10:51:17.000000000 +0100
+++ vlc-3.0.16/src/posix/thread.c	2021-04-27 15:18:39.000000000 +0200
@@ -712,6 +712,8 @@
         count = sysconf (_SC_NPROCESSORS_ONLN);
     free (cpulist);
     return count ? count : 1;
+#elif defined(_SC_NPROCESSORS_ONLN)
+    return sysconf(_SC_NPROCESSORS_ONLN);
 #elif defined(_SC_NPROCESSORS_CONF)
     return sysconf(_SC_NPROCESSORS_CONF);
 #else
diff -Nru vlc-3.0.12/src/revision.c vlc-3.0.16/src/revision.c
--- vlc-3.0.12/src/revision.c	2021-01-17 21:32:38.000000000 +0100
+++ vlc-3.0.16/src/revision.c	2021-05-10 17:19:40.000000000 +0200
@@ -1 +1 @@
-const char psz_vlc_changeset[] = "3.0.12-1-0-gd147bb5e7e";
+const char psz_vlc_changeset[] = "3.0.13-8-g41878ff4f2";
diff -Nru vlc-3.0.12/src/revision.txt vlc-3.0.16/src/revision.txt
--- vlc-3.0.12/src/revision.txt	2021-01-17 21:32:37.000000000 +0100
+++ vlc-3.0.16/src/revision.txt	2021-05-10 17:19:40.000000000 +0200
@@ -1 +1 @@
-3.0.12-1-0-gd147bb5e7e
+3.0.13-8-g41878ff4f2
diff -Nru vlc-3.0.12/src/test/url.c vlc-3.0.16/src/test/url.c
--- vlc-3.0.12/src/test/url.c	2020-02-27 12:11:57.000000000 +0100
+++ vlc-3.0.16/src/test/url.c	2021-03-20 19:20:19.000000000 +0100
@@ -2,7 +2,7 @@
  * url.c: Test for url encoding/decoding stuff
  *****************************************************************************
  * Copyright (C) 2006 Rémi Denis-Courmont
- * $Id: e170d8b0ab3a3f55fc709b261aefd303fa747da5 $
+ * $Id: ab02571ac77b83acc765e05f0c9ee5452f5dfc8b $
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published by
@@ -158,16 +158,6 @@
     test(vlc_uri_fixup, expected, expected);
 }
 
-static char *vlc_uri_resolve_separators_test(const char *in)
-{
-    return vlc_uri_resolve("file:///a/b/c//d.ext", in);
-}
-
-static void test_separators(const char *reference, const char *expected)
-{
-    test(vlc_uri_resolve_separators_test, reference, expected);
-}
-
 int main (void)
 {
     (void)setvbuf (stdout, NULL, _IONBF, 0);
@@ -373,16 +363,6 @@
 
     for (size_t i = 0; i < ARRAY_SIZE(rfc3986_cases); i += 2)
         test_rfc3986(rfc3986_cases[i], rfc3986_cases[i + 1]);
-    static const char* separators_patterns[] = {
-        "../",                      "file:///a/b/",
-        "./",                       "file:///a/b/c/",
-        "../../../../../../../",    "file:///",
-        "..///////////////",        "file:///a/b/",
-        ".///////////////",         "file:///a/b/c/",
-        "..//..//",                 "file:///a/",
-    };
-    for (size_t i = 0; i < ARRAY_SIZE(separators_patterns); i += 2)
-        test_separators(separators_patterns[i], separators_patterns[i + 1]);
 
     /* Check that fixup does not mangle valid URIs */
     static const char *valid_uris[] =
diff -Nru vlc-3.0.12/src/text/iso-639_def.h vlc-3.0.16/src/text/iso-639_def.h
--- vlc-3.0.12/src/text/iso-639_def.h	2017-11-24 16:29:18.000000000 +0100
+++ vlc-3.0.16/src/text/iso-639_def.h	2021-06-09 17:27:37.000000000 +0200
@@ -2,7 +2,7 @@
  * iso-639_def.h: languages codes and abbreviations
  *****************************************************************************
  * Copyright (C) 1998-2004 VLC authors and VideoLAN
- * $Id: ca199ee519d00d176dd12ba37f85b38f2ef980fe $
+ * $Id: 87b08fdf5db07d10019044abac0c0d5c049ccf28 $
  *
  * This is used in iso_lang.cpp and is taken from the GNU glibc 2.2.5
  * tarball. It has been partially completed with native language names.
@@ -99,6 +99,7 @@
     { N_( "Indonesian" ),                     "id", "ind", "ind" },
     { N_( "Inupiaq" ),                        "ik", "ipk", "ipk" },
     { N_( "Italian" ),                        "it", "ita", "ita" },
+    { N_( "Hebrew" ),                         "iw", "heb", "heb" },
     { N_( "Javanese" ),                       "jv", "jaw", "jav" },
     { N_( "Japanese" ),                       "ja", "jpn", "jpn" },
     { N_( "Greenlandic, Kalaallisut" ),       "kl", "kal", "kal" },
diff -Nru vlc-3.0.12/src/text/url.c vlc-3.0.16/src/text/url.c
--- vlc-3.0.12/src/text/url.c	2020-02-27 12:11:57.000000000 +0100
+++ vlc-3.0.16/src/text/url.c	2021-03-20 19:20:19.000000000 +0100
@@ -401,26 +401,6 @@
     return vlc_uri_component_validate(str, "/@:");
 }
 
-static void vlc_uri_fixup_duplicated_separators(char *str)
-{
-    if (str == NULL)
-        return;
-    char *input = str, *output = str;
-    while (*input)
-    {
-        assert(input >= output);
-        if (*input == '/')
-        {
-            *output++ = *input;
-            while (*input == '/')
-                input++;
-        }
-        else
-            *output++ = *input++;
-    }
-    *output = 0;
-}
-
 static int vlc_UrlParseInner(vlc_url_t *restrict url, const char *str)
 {
     url->psz_protocol = NULL;
@@ -568,7 +548,6 @@
     {
         url->psz_path = cur;
     }
-    vlc_uri_fixup_duplicated_separators(url->psz_path);
 
     return ret;
 }
diff -Nru vlc-3.0.12/src/video_output/video_epg.c vlc-3.0.16/src/video_output/video_epg.c
--- vlc-3.0.12/src/video_output/video_epg.c	2017-12-21 11:16:57.000000000 +0100
+++ vlc-3.0.16/src/video_output/video_epg.c	2021-05-26 10:24:22.000000000 +0200
@@ -60,11 +60,11 @@
 #define EPGOSD_TEXTSIZE_PROG    (OSDEPG_ROWS(2))
 #define EPGOSD_TEXTSIZE_NTWK    (OSDEPG_ROWS(2))
 
-//#define RGB_COLOR1   0xf48b00
-//#define ARGB_BGCOLOR 0xC0333333
+#define RGB_COLOR1   0xf48b00
+#define ARGB_BGCOLOR 0xC0333333
 
-#define RGB_COLOR1   0x2badde
-#define ARGB_BGCOLOR 0xc003182d
+//#define RGB_COLOR1   0x2badde
+//#define ARGB_BGCOLOR 0xc003182d
 
 struct subpicture_updater_sys_t
 {
diff -Nru vlc-3.0.12/src/video_output/video_widgets.c vlc-3.0.16/src/video_output/video_widgets.c
--- vlc-3.0.12/src/video_output/video_widgets.c	2018-06-01 15:44:08.000000000 +0200
+++ vlc-3.0.16/src/video_output/video_widgets.c	2021-05-26 10:24:22.000000000 +0200
@@ -2,7 +2,7 @@
  * video_widgets.c : OSD widgets manipulation functions
  *****************************************************************************
  * Copyright (C) 2004-2010 VLC authors and VideoLAN
- * $Id: 9644fe90cc94cd1265454b38427d178e5ac3d7d1 $
+ * $Id: d4735e591a0724cc5585dc686f4ffd9d0e6fe415 $
  *
  * Author: Yoann Peronneau <yoann@videolan.org>
  *         Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
@@ -42,11 +42,13 @@
 #define STYLE_FILLED 1
 
 #define RGB_BLUE        0x2badde
+#define RGB_ORANGE      0xf48b00
+#define RGB_FILL        RGB_ORANGE
 
 #define COL_TRANSPARENT 0
 #define COL_WHITE       1
-#define COL_BLUE        2
-#define COL_BLUE_SHADE  3
+#define COL_FILL        2
+#define COL_FILL_SHADE  3
 
 #define SET_PALETTE_COLOR(id, rgb, alpha) \
 {\
@@ -121,8 +123,8 @@
     video_palette_t palette;
     SET_PALETTE_COLOR(COL_WHITE,       0xffffff, STYLE_ALPHA_OPAQUE)
     SET_PALETTE_COLOR(COL_TRANSPARENT, 0xffffff, STYLE_ALPHA_TRANSPARENT)
-    SET_PALETTE_COLOR(COL_BLUE,        RGB_BLUE, STYLE_ALPHA_OPAQUE)
-    SET_PALETTE_COLOR(COL_BLUE_SHADE,  RGB_BLUE, 0x40)
+    SET_PALETTE_COLOR(COL_FILL,        RGB_FILL, 0xA0)
+    SET_PALETTE_COLOR(COL_FILL_SHADE,  RGB_FILL, 0x25)
     palette.i_entries = 4;
 
     video_format_t fmt;
@@ -154,20 +156,21 @@
 {
     const int size = __MAX(fmt->i_visible_width, fmt->i_visible_height);
     const int margin = size * SLIDER_MARGIN_BASE;
-    const int marginbottom = size * SLIDER_MARGIN_BASE * 0.6;
-    uint8_t i_padding = __MIN(5, size * 0.25); /* small sizes */
+    const int marginbottom = margin * 0.2;
+    const int marginright = margin * 0.5;
+    uint8_t i_padding = __MIN(1, size * 0.25); /* small sizes */
 
     int x, y;
     int width, height;
     if (type == OSD_HOR_SLIDER) {
         width  = __MAX(fmt->i_visible_width - 2 * margin, 1);
-        height = __MAX(fmt->i_visible_height * 0.05,      1);
+        height = __MAX(fmt->i_visible_height * 0.01,      1);
         x      = __MIN(fmt->i_x_offset + margin, fmt->i_visible_width - width);
         y      = __MAX(fmt->i_y_offset + fmt->i_visible_height - marginbottom, 0);
     } else {
-        width  = __MAX(fmt->i_visible_width * 0.025,       1);
+        width  = __MAX(fmt->i_visible_width * 0.010,       1);
         height = __MAX(fmt->i_visible_height - 2 * margin, 1);
-        x      = __MAX(fmt->i_x_offset + fmt->i_visible_width - margin, 0);
+        x      = __MAX(fmt->i_x_offset + fmt->i_visible_width - marginright, 0);
         y      = __MIN(fmt->i_y_offset + margin, fmt->i_visible_height - height);
     }
 
@@ -191,8 +194,8 @@
     }
 
     /* one full fill is faster than drawing outline */
-    DrawRect(r, STYLE_FILLED, COL_BLUE_SHADE, 0, 0, width - 1, height - 1);
-    DrawRect(r, STYLE_FILLED, COL_BLUE, pos_x, pos_y, pos_xend, pos_yend);
+    DrawRect(r, STYLE_FILLED, COL_FILL_SHADE, 0, 0, width - 1, height - 1);
+    DrawRect(r, STYLE_FILLED, COL_FILL, pos_x, pos_y, pos_xend, pos_yend);
 
     return r;
 }
@@ -240,7 +243,7 @@
         DrawTriangle(r, STYLE_FILLED, COL_WHITE, width - delta, 0, delta, y2);
         if (type == OSD_MUTE_ICON) {
             for(int y1 = 0; y1 <= height -1; y1++)
-                DrawRect(r, STYLE_FILLED, COL_BLUE, y1, y1, __MIN(y1 + delta, width - 1), y1);
+                DrawRect(r, STYLE_FILLED, COL_FILL, y1, y1, __MIN(y1 + delta, width - 1), y1);
         }
     }
     return r;

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Hi,

On 27-06-2021 17:15, Sebastian Ramacher wrote:
> Please unblock package vlc.

unblocked.

Paul

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


--- End Message ---

Reply to: