[MPlayer-cvslog] CVS: main/libmpdemux muxer_lavf.c,1.14,1.15

Richard Felker CVS syncmail at mplayerhq.hu
Fri Dec 2 20:43:38 CET 2005


CVS change done by Richard Felker CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv1299/libmpdemux

Modified Files:
	muxer_lavf.c 
Log Message:
muxer_lavf MUST be disabled by default until someone adds AVParser
support to it. Otherwise users will generate files with totally
nonsensical pts if they use B frames! (And they are already doing so
-- see mplayer-users list!)

If anyone wants to volunteer to add AVParser support, go right ahead!
But until then, do not remove this check. :)


Index: muxer_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_lavf.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- muxer_lavf.c	29 Nov 2005 22:04:57 -0000	1.14
+++ muxer_lavf.c	2 Dec 2005 19:43:36 -0000	1.15
@@ -38,9 +38,11 @@
 } muxer_stream_priv_t;
 
 static char *conf_format = NULL;
+static int conf_allow_lavf = 0;
 
 m_option_t lavfopts_conf[] = {
 	{"format", &(conf_format), CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"i_certify_that_my_video_stream_does_not_use_b_frames", &conf_allow_lavf, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
@@ -296,6 +298,24 @@
 	muxer_priv_t *priv;
 	AVOutputFormat *fmt = NULL;
 	char mp_filename[256] = "menc://stream.dummy";
+
+	mp_msg(MSGT_MUXER, MSGL_WARN, "** MUXER_LAVF *****************************************************************\n");
+	if (!conf_allow_lavf) {
+		mp_msg(MSGT_MUXER, MSGL_FATAL,
+"If you wish to use libavformat muxing, you must ensure that your video stream\n"
+"does not contain B frames (out of order decoding) and specify:\n"
+"    -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames\n"
+"on the command line.\n");
+	} else {
+		mp_msg(MSGT_MUXER, MSGL_WARN,
+"You have certified that your video stream does not contain B frames.\n");
+	}
+	mp_msg(MSGT_MUXER, MSGL_WARN,
+"REMEMBER: MEncoder's libavformat muxing is presently broken and will generate\n"
+"INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer\n"
+"will play these INCORRECT files as if nothing were wrong!\n"
+"*******************************************************************************\n");
+	if (!conf_allow_lavf) return 0;
 	
 	priv = (muxer_priv_t *) calloc(1, sizeof(muxer_priv_t));
 	if(priv == NULL)




More information about the MPlayer-cvslog mailing list