diff options
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream.h | 1 | ||||
-rw-r--r-- | stream/stream_ffmpeg.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/stream/stream.h b/stream/stream.h index 523da2ce00..62a2ee8d4e 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -160,6 +160,7 @@ typedef struct stream { void* cache_data; void* priv; // used for DVD, TV, RTSP etc char* url; // strdup() of filename/url + char *lavf_type; // name of expected demuxer type for lavf struct MPOpts *opts; #ifdef CONFIG_NETWORK streaming_ctrl_t *streaming_ctrl; diff --git a/stream/stream_ffmpeg.c b/stream/stream_ffmpeg.c index 30d63001d0..fe8df9446d 100644 --- a/stream/stream_ffmpeg.c +++ b/stream/stream_ffmpeg.c @@ -24,6 +24,7 @@ #include "stream.h" #include "m_option.h" #include "m_struct.h" +#include "libmpdemux/demuxer.h" static int fill_buffer(stream_t *s, char *buffer, int max_len) { @@ -102,6 +103,12 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format) if (!dummy && url_open(&ctx, filename, flags) < 0) goto out; + mp_msg(MSGT_OPEN, MSGL_V, "[ffmpeg] libavformat URL type: %s\n", + ctx->prot->name); + if (!strncmp("rtmp", ctx->prot->name, 4)) { + *file_format = DEMUXER_TYPE_LAVF; + stream->lavf_type = "flv"; + } stream->priv = ctx; size = dummy ? 0 : url_filesize(ctx); if (size >= 0) |