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:
jp9000
2019-11-25 23:00:42 -08:00
parent d7b00c095f
commit 772f80d860
+4 -2
View File
@@ -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);