diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-23 22:57:25 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-23 22:57:25 +0300 |
commit | 1d4d1bff82f70c7cde37b1beaf1b55c72b3d6618 (patch) | |
tree | 9840f3aad145d33c9a6cda7ba020dae439123d4d /libmpdemux | |
parent | 4583c12a2c29c9644acc15837c2f18ba7750bf1e (diff) | |
download | mpv-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 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_lavf.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 3140b5459f..1222673d87 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -135,15 +135,17 @@ static int lavf_check_file(demuxer_t *demuxer){ av_register_all(); - if (lavfdopts->format) { - if (strcmp(lavfdopts->format, "help") == 0) { + char *format = lavfdopts->format; + if (!format) + format = demuxer->stream->lavf_type; + if (format) { + if (strcmp(format, "help") == 0) { list_formats(); return 0; } - priv->avif= av_find_input_format(lavfdopts->format); + priv->avif = av_find_input_format(format); if (!priv->avif) { - mp_msg(MSGT_DEMUX,MSGL_FATAL,"Unknown lavf format %s\n", - lavfdopts->format); + mp_msg(MSGT_DEMUX, MSGL_FATAL, "Unknown lavf format %s\n", format); return 0; } mp_msg(MSGT_DEMUX,MSGL_INFO,"Forced lavf %s demuxer\n", priv->avif->long_name); |