deps/media-playback: Don't use interrupt cb for local files
This fixes an issue where local files were using the avformat interrupt callback, which is only supposed to be use to prevent blocking on network calls.
This commit is contained in:
6
deps/media-playback/media-playback/media.c
vendored
6
deps/media-playback/media-playback/media.c
vendored
@@ -577,8 +577,10 @@ static bool init_avformat(mp_media_t *m)
|
||||
av_dict_set_int(&opts, "buffer_size", m->buffering, 0);
|
||||
|
||||
m->fmt = avformat_alloc_context();
|
||||
m->fmt->interrupt_callback.callback = interrupt_callback;
|
||||
m->fmt->interrupt_callback.opaque = m;
|
||||
if (!m->is_local_file) {
|
||||
m->fmt->interrupt_callback.callback = interrupt_callback;
|
||||
m->fmt->interrupt_callback.opaque = m;
|
||||
}
|
||||
|
||||
int ret = avformat_open_input(&m->fmt, m->path, format,
|
||||
opts ? &opts : NULL);
|
||||
|
Reference in New Issue
Block a user