[MPlayer-cvslog] r36441 - in trunk: libmpdemux/demux_lavf.c stream/stream_ffmpeg.c

reimar subversion at mplayerhq.hu
Tue Sep 3 22:28:25 CEST 2013


Author: reimar
Date: Tue Sep  3 22:28:25 2013
New Revision: 36441

Log:
Quick hack to allow using ffmpeg's image2 demuxer.

Modified:
   trunk/libmpdemux/demux_lavf.c
   trunk/stream/stream_ffmpeg.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Tue Sep  3 22:05:29 2013	(r36440)
+++ trunk/libmpdemux/demux_lavf.c	Tue Sep  3 22:28:25 2013	(r36441)
@@ -542,7 +542,9 @@ static demuxer_t* demux_open_lavf(demuxe
     }
 
     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));

Modified: trunk/stream/stream_ffmpeg.c
==============================================================================
--- trunk/stream/stream_ffmpeg.c	Tue Sep  3 22:05:29 2013	(r36440)
+++ trunk/stream/stream_ffmpeg.c	Tue Sep  3 22:28:25 2013	(r36441)
@@ -121,7 +121,7 @@ static int open_f(stream_t *stream, int 
     }
     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)


More information about the MPlayer-cvslog mailing list