summaryrefslogtreecommitdiffstats
path: root/stream/stream_ffmpeg.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-23 22:57:25 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-23 22:57:25 +0300
commit1d4d1bff82f70c7cde37b1beaf1b55c72b3d6618 (patch)
tree9840f3aad145d33c9a6cda7ba020dae439123d4d /stream/stream_ffmpeg.c
parent4583c12a2c29c9644acc15837c2f18ba7750bf1e (diff)
downloadmpv-1d4d1bff82f70c7cde37b1beaf1b55c72b3d6618.tar.bz2
mpv-1d4d1bff82f70c7cde37b1beaf1b55c72b3d6618.tar.xz
stream_ffmpeg, demux_lavf: Use flv demuxer for rtmp streams
Use lavf's flv demuxer for rtmp/rtmps/... stream types. Letting generic format probing handle this could work, but with the current probing implementation it'd at least depend on not-really-guaranteed details of the stream layer (probing different formats and then decoding depends on seeking back in between; rtmp streams don't support such seeking directly so would need to rely on details of caching behavior).
Diffstat (limited to 'stream/stream_ffmpeg.c')
-rw-r--r--stream/stream_ffmpeg.c7
1 files changed, 7 insertions, 0 deletions
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)