changeset 36344:1251f8aa5785

muxer_lavf: partially support formats creating files own their own. This works with e.g. image2, but is a bit messy since using img%d.png results in mencoder itself creating a file with exactly this name while lavf creates the correctly numbered ones.
author reimar
date Tue, 03 Sep 2013 20:05:29 +0000
parents 57a21cd090a1
children 996d93a5ed1f
files libmpdemux/muxer_lavf.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c	Tue Sep 03 20:05:28 2013 +0000
+++ b/libmpdemux/muxer_lavf.c	Tue Sep 03 20:05:29 2013 +0000
@@ -364,6 +364,8 @@
 		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));
 	priv->oc->oformat = fmt;