changeset 36346:13e767d419fc

Support ffmpeg://dummy:// in muxer_lavf.
author reimar
date Tue, 03 Sep 2013 20:36:41 +0000
parents 996d93a5ed1f
children e681dc0ea00a
files libmpdemux/muxer_lavf.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c	Tue Sep 03 20:28:25 2013 +0000
+++ b/libmpdemux/muxer_lavf.c	Tue Sep 03 20:36:41 2013 +0000
@@ -364,8 +364,12 @@
 		mp_msg(MSGT_MUXER, MSGL_FATAL, "Cannot get specified format.\n");
 		goto fail;
 	}
-	if (fmt->flags & AVFMT_NOFILE)
-            av_strlcpy(priv->oc->filename, out_filename, sizeof(priv->oc->filename));
+	if (fmt->flags & AVFMT_NOFILE) {
+            const char *src = out_filename;
+            if (!strncmp(out_filename, "ffmpeg://dummy://", 17)) src += 17;
+            else if (!strncmp(out_filename, "ffmpeg://", 9)) src += 9;
+            av_strlcpy(priv->oc->filename, src, sizeof(priv->oc->filename));
+	}
 	priv->oc->oformat = fmt;