changeset 36345:996d93a5ed1f

Quick hack to allow using ffmpeg's image2 demuxer.
author reimar
date Tue, 03 Sep 2013 20:28:25 +0000
parents 1251f8aa5785
children 13e767d419fc
files libmpdemux/demux_lavf.c stream/stream_ffmpeg.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Tue Sep 03 20:05:29 2013 +0000
+++ b/libmpdemux/demux_lavf.c	Tue Sep 03 20:28:25 2013 +0000
@@ -542,7 +542,9 @@
     }
 
     if(demuxer->stream->url) {
-        if (!strncmp(demuxer->stream->url, "ffmpeg://", 9))
+        if (!strncmp(demuxer->stream->url, "ffmpeg://dummy://", 17))
+            av_strlcpy(mp_filename, demuxer->stream->url + 17, sizeof(mp_filename));
+        else if (!strncmp(demuxer->stream->url, "ffmpeg://", 9))
             av_strlcpy(mp_filename, demuxer->stream->url + 9, sizeof(mp_filename));
         else if (!strncmp(demuxer->stream->url, "rtsp://", 7))
             av_strlcpy(mp_filename, demuxer->stream->url, sizeof(mp_filename));
--- a/stream/stream_ffmpeg.c	Tue Sep 03 20:05:29 2013 +0000
+++ b/stream/stream_ffmpeg.c	Tue Sep 03 20:28:25 2013 +0000
@@ -121,7 +121,7 @@
     }
     if (!strncmp(filename, prefix, strlen(prefix)))
         filename += strlen(prefix);
-    dummy = !strncmp(filename, "rtsp:", 5);
+    dummy = !strncmp(filename, "rtsp:", 5) || !strncmp(filename, "dummy:", 6);
     mp_msg(MSGT_OPEN, MSGL_V, "[ffmpeg] Opening %s\n", filename);
 
     if (!dummy && avio_open(&ctx, filename, flags) < 0)