mpv/common
Guido Cella c470934236 command: fix segfault with playlist-{next,prev}-playlist
This was wrongly assuming that playlist_path is always set for the
current playlist entry, but it's only set when a file was added by
expanding a playlist.

The crash in playlist_get_first_in_next_playlist can be reproduced with
mpv foo.mkv foo.zip, playlist-next, playlist-prev,
playlist-next-playlist. You need to run playlist-next, playlist-prev
first because foo.zip's playlist_path is NULL until you do that, which
makes playlist_get_first_in_next_playlist return immediately.

The crash in cmd_playlist_next_prev_playlist can be replicated with mpv
--loop-playlist foo.zip foo.mkv, running playlist-next until foo.mkv,
and playlist-play-next. Again, you need to open foo.zip first or its
playlist_path is NULL which skips running strcmp(entry->playlist_path,
mpctx->playlist->current->playlist_path).

Fixes https://github.com/mpv-player/mpv/issues/12495#issuecomment-1760968608
2023-10-13 13:54:43 +00:00
..
av_common.c common/av_common: clean up mp_lavc_set_extradata 2023-03-14 23:59:47 +02:00
av_common.h common/av_common: clean up mp_lavc_set_extradata 2023-03-14 23:59:47 +02:00
av_log.c common/av_log: move general FFmpeg version before library versions 2022-11-15 21:41:22 +02:00
av_log.h player: rearrange libav* library check 2020-03-08 19:38:10 +01:00
codecs.c codecs: remove unused family field 2018-02-01 10:21:55 +01:00
codecs.h codecs: remove unused family field 2018-02-01 10:21:55 +01:00
common.c vo: add --video-crop 2023-08-31 17:37:42 +00:00
common.h vo: add --video-crop 2023-08-31 17:37:42 +00:00
encode.h options: remove a few options marked with .deprecation_message 2023-09-21 16:06:29 +00:00
encode_lavc.c options: remove a few options marked with .deprecation_message 2023-09-21 16:06:29 +00:00
encode_lavc.h options: remove a few options marked with .deprecation_message 2023-09-21 16:06:29 +00:00
global.h path: simplify "cache" and "state" fallback 2023-05-21 20:11:24 +02:00
meson.build build: remove version.py 2023-08-02 18:51:13 +00:00
msg.c msg: use nanosecond precision 2023-09-29 18:20:30 -05:00
msg.h msg: add function to reduce log level 2020-05-10 16:40:26 +02:00
msg_control.h various: add missing include in header flles 2023-09-21 14:40:11 +00:00
playlist.c command: fix segfault with playlist-{next,prev}-playlist 2023-10-13 13:54:43 +00:00
playlist.h command: add playlist-next-playlist and playlist-prev-playlist 2023-10-09 15:09:35 +00:00
recorder.c recorder: fix a couple of memory leaks 2023-09-26 22:09:15 +00:00
recorder.h recorder: add support for attachments (fonts) 2021-07-08 12:44:06 +03:00
stats.c win32/pthread: define _POSIX_TIMERS to notify they are not supported 2023-09-29 20:48:58 +00:00
stats.h player, stats: more silly debug stuff 2020-04-10 00:55:39 +02:00
tags.c demux: support for some kinds of timed metadata 2018-04-18 01:17:42 +03:00
tags.h demux: support for some kinds of timed metadata 2018-04-18 01:17:42 +03:00
version.c version: move NO_BUILD_TIMESTAMPS check to version.h.in 2023-08-02 18:51:13 +00:00
version.h.in version: move NO_BUILD_TIMESTAMPS check to version.h.in 2023-08-02 18:51:13 +00:00