Skip to content

Conversation

@dgeelen
Copy link

@dgeelen dgeelen commented Mar 20, 2017

Hi,

Your clone of the MiniDLNA seems to be the most recently active, so I'm sending my pull request to you.

This enables you to override the URL minidlna advertises for itself on the network. By default it will try to use the IP-address of the receiving interface, but this is not always desired. Please see https://github.com/dgeelen/ssdp-bridge for a more in-depth explanation.

Jens Krueger and others added 16 commits October 21, 2016 23:28
If we run out of inotify watches, try dynamically increasing the limit.
FFmpeg 3.0, as used on Ubuntu Yakkety, did not include the codecpar
changes, although it uses the same library major version. So refine the
libavformat version check to sort that out.
We don't need to export inotify_remove_file(), since it isn't used
anywhere else.
TiVo Bolt doesn't support the old TiVo Beacon discovery mechanism, so
we need to support Bonjour discovery now.  Use Avahi if it's available.
Avahi and Ogg/Vorbis library conditional enablement wasn't working as
intended.
If we encounter a 3GP video file with no audio stream, we could end up
accessing out-of-bounds memory.
From SF user Andrea Odetti:

The Samsung BD J5500 player does not accept some of the DLNA_PN values
used by minidlna for *.mp4 files.

For instance AVC_MP4_MP_HD_720p_AAC and AVC_MP4_BL_L31_HD_AAC are
problematic as the player would simply ignore the files and not show
them.

AVC_MP4_HP_HD_AAC works.

All the files play normally from a USB key.

I've noticed as well that NULL works always, and this is the approach I
have followed.

So I changed minidlna and added a flag to disable DLNA_PN, and this
flag is only used for a Samsung BD J5500 in order not to break other
players, which can handle DLNA_PN properly.

So when a J5500 is connected we simply set DLNA_PN to NULL and
everything works well.
On Hyundai HLN 24TS382 Smart TV, the DLNA client refuses to display
media files whose title does not end with a media file extension.
Because minidlna strips the extensions, all folders thus appear empty.

This patch adds a quirk for Hyundai TVs that appends the original file
extension to the titles, which fixes the issue.
New functionality, based on Shrimpkin's patch #145 on SF.
glebius and others added 30 commits January 16, 2018 17:02
…rom FreeBSD ports extra patch. Probably it was working on previous versions of SQLite, or on previous minidlna schema.
…ortions of code that were made either by William or by Stefan. Since I am unsure about that, put them both. To be clarified later.
…ported by the system, otherwise fallback to block check. This allows to workaround bugs with SMB client and not introduce new bugs for filesystems with compression and deduplication.

This has theoretical bug if our collection spans different
filesystems and some filesystems support holes, and some not.
If this ever encountered we should use pathconf(2) and cache
its result for directories.
Add back SSDP filtering.  Relying on the kernel to filter out multicast
traffic from non-member interfaces simply doesn't work the way many
people think it does, so we need to re-introduce manual filtering.  But
this time we will use in_pktinfo's ifindex for comparison rather than a
netmask comparison, so SSDP packets from other subnets should still work.
There's no point in returning bookmark info without a bookmark.  It also
has been reported that certain Samsung models may have issues with
subtitles if we send dcmInfo data.  So we'll only return it if we have a
bookmark set.

[minidlna:support-requests] #52 External srt subtitles for Samsung UA48JU7800
The Control4 app apparently sends us badly-formatted SearchCriteria,
where they don't quote the upnp:class value.  So we'll add it in for them
if we detect that situation.

Fixes: SF Patches #173 (DLNA search query not as minidlna expects)
Fixes a harmless memory leak reported by Valgrind.
There's a report about a nightly "crash" when users download, compile
from source, and replace their distro's mindlnad binary.  This is because
the Debian package includes a patch that uses SIGUSR2 to reopen the log
file and sends SIGUSR2 from logrotate instead of just using the
"copytruncate" logrotate option.  Then logrotate sends SIGUSR2 at 6:25AM,
which causes us to abort due to the unhandled signal.

I don't want to sacrifice SIGUSR2 just for log rotation, especially when
we already do some reload operations on SIGHUP.  So to avoid this
Debian/Ubuntu issue, we'll explicitly ignore SIGUSR2, and add log file
reopening to the SIGHUP handler.  Then hopefully a future Debian package
version will remove the SIGUSR2 patch and use SIGHUP instead (or
copytruncate).

Fixes: SF Bug #313 (log rotation kills minidlna service)
getsyshwaddr assumed that the first ifaddr it came across was the MAC
address, and as such assumes that it has the right length. After
upgrading to OS X 10.13.4, this causes minidlnad to crash on startup due
to tripping stack smash protection -- I'm not sure if the order of
addresses returned previously happened to accidentally hit this
invariant, or if this was always an issue and the stack smash protection
got smarter.

In any event, we just need to look for the AF_LINK address and use that.
As an extra check, we make sure the length is the length we expect to
copy into the target buffer.
* add mimetype audio/x-dsd  (.dsf/.dff)
* add id3tag and fileinfo support (only .dsf)
# Conflicts:
#	minidlna.c
#	minissdp.c
#	monitor.c
#	scanner.c
#	upnpglobalvars.c
#	upnpglobalvars.h
#	upnphttp.c
#	upnpsoap.c
#	utils.c
C arrays are not null-terminated by default.
* It might start the queue multiple times (when initiating a rescan from the web ui)
* It did not properly detect the scan was finished when we ourselves were the scanner

Additionally we can simplify the initialisation if we always register with
libav; someone is bound to need it anyway.
# Conflicts:
#	minidlna.c
#	minissdp.c
#	upnpglobalvars.c
#	upnpglobalvars.h
#	upnpsoap.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.