summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-09-07 21:41:52 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commitf77515ebafb9fdfd177671b848211824e654206f (patch)
tree8bbc1adc712b6edb7d81e5b0d7f19a1e293e257b /demux
parent0fa38121a6ce6baed277b17a1ca1e28f5978343f (diff)
downloadmpv-f77515ebafb9fdfd177671b848211824e654206f.tar.bz2
mpv-f77515ebafb9fdfd177671b848211824e654206f.tar.xz
stream_libarchive: remove base filename stuff
Apparently this was so that when playing a video file from a .rar file, it would load external subtitles with the same name (instead of looking for mpv's rar:// mangled URL). This was requested on github almost 5 years ago. Seems like a weird feature, and I don't care. Drop it, because it complicates some in progress change.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/demux/demux.c b/demux/demux.c
index daf59ff8f4..6c4f9542f8 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -223,8 +223,6 @@ struct demux_internal {
int64_t last_speed_query;
uint64_t bytes_per_second;
int64_t next_cache_update;
- // Updated during init only.
- char *stream_base_filename;
// -- Access from demuxer thread only
bool enable_recording;
@@ -2241,16 +2239,6 @@ void demux_update(demuxer_t *demuxer)
pthread_mutex_unlock(&in->lock);
}
-static void demux_init_cache(struct demuxer *demuxer)
-{
- struct demux_internal *in = demuxer->in;
- struct stream *stream = demuxer->stream;
-
- char *base = NULL;
- stream_control(stream, STREAM_CTRL_GET_BASE_FILENAME, &base);
- in->stream_base_filename = talloc_steal(demuxer, base);
-}
-
static void demux_init_cuesheet(struct demuxer *demuxer)
{
char *cue = mp_tags_get_str(demuxer->metadata, "cuesheet");
@@ -2414,7 +2402,6 @@ static struct demuxer *open_given_type(struct mpv_global *global,
in->d_thread->partially_seekable = true;
}
demux_init_cuesheet(in->d_thread);
- demux_init_cache(demuxer);
demux_init_ccs(demuxer, opts);
demux_copy(in->d_user, in->d_thread);
in->duration = in->d_thread->duration;
@@ -3136,11 +3123,6 @@ static int cached_stream_control(struct demux_internal *in, int cmd, void *arg)
return STREAM_UNSUPPORTED;
*(int64_t *)arg = in->stream_size;
return STREAM_OK;
- case STREAM_CTRL_GET_BASE_FILENAME:
- if (!in->stream_base_filename)
- return STREAM_UNSUPPORTED;
- *(char **)arg = talloc_strdup(NULL, in->stream_base_filename);
- return STREAM_OK;
}
return STREAM_ERROR;
}