Enable resuming playback from saved position for certain media kinds (eg audiobooks)

This commit is contained in:
ejurgensen
2015-08-04 22:33:32 +02:00
parent 7881df67f6
commit 68912efa1f
11 changed files with 91 additions and 62 deletions

View File

@@ -507,13 +507,13 @@ transcode_setup(struct transcode_ctx **nctx, struct media_file_info *mfi, off_t
#if LIBAVFORMAT_VERSION_MAJOR >= 54 || (LIBAVFORMAT_VERSION_MAJOR == 53 && LIBAVFORMAT_VERSION_MINOR >= 3)
# ifndef HAVE_FFMPEG
// Without this, libav is slow to probe some internet streams, which leads to RAOP timeouts
if (mfi->data_kind == DATA_KIND_URL)
if (mfi->data_kind == DATA_KIND_HTTP)
{
ctx->fmtctx = avformat_alloc_context();
ctx->fmtctx->probesize = 64000;
}
# endif
if (mfi->data_kind == DATA_KIND_URL)
if (mfi->data_kind == DATA_KIND_HTTP)
av_dict_set(&options, "icy", "1", 0);
ret = avformat_open_input(&ctx->fmtctx, mfi->path, NULL, &options);