From 0b1c3e8de22afc89868ad4aeb2a70738de33288c Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 4 Aug 2015 17:04:56 +0200 Subject: player: warn against using HLS URLs with --playlist That just makes no sense, but seems to be a somewhat common user error. The detection is not perfect. It's conceivable that EXT-X-... headers are used in normal m3u playlists. After all, HLS playlists are by definition a compatible extension to m3u playlists, as stupid as it sounds. --- common/playlist.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/playlist.c b/common/playlist.c index df3b65fbbc..9fd087be67 100644 --- a/common/playlist.c +++ b/common/playlist.c @@ -281,6 +281,10 @@ struct playlist *playlist_parse_file(const char *file, struct mpv_global *global if (d && d->playlist) { ret = talloc_zero(NULL, struct playlist); playlist_transfer_entries(ret, d->playlist); + if (d->filetype && strcmp(d->filetype, "hls") == 0) { + mp_warn(log, "This might be a HLS stream. For correct operation, " + "pass it to the player\ndirectly. Don't use --playlist.\n"); + } } free_demuxer_and_stream(d); -- cgit v1.2.3