[MPlayer-cvslog] r22216 - trunk/libmpdemux/muxer_lavf.c

reimar subversion at mplayerhq.hu
Wed Feb 14 12:06:59 CET 2007


Author: reimar
Date: Wed Feb 14 12:06:59 2007
New Revision: 22216

Modified:
   trunk/libmpdemux/muxer_lavf.c

Log:
Print list of lavf muxer formats with format=help.


Modified: trunk/libmpdemux/muxer_lavf.c
==============================================================================
--- trunk/libmpdemux/muxer_lavf.c	(original)
+++ trunk/libmpdemux/muxer_lavf.c	Wed Feb 14 12:06:59 2007
@@ -322,6 +322,13 @@
 	av_free(priv->oc);
 }
 
+static void list_formats(void) {
+	AVOutputFormat *fmt;
+	mp_msg(MSGT_DEMUX, MSGL_INFO, "Available lavf output formats:\n");
+	for (fmt = first_oformat; fmt; fmt = fmt->next)
+		mp_msg(MSGT_DEMUX, MSGL_INFO, "%15s : %s\n", fmt->name, fmt->long_name);
+}
+
 extern char *out_filename;
 int muxer_init_muxer_lavf(muxer_t *muxer)
 {
@@ -329,6 +336,13 @@
 	AVOutputFormat *fmt = NULL;
 	char mp_filename[256] = "menc://stream.dummy";
 
+	av_register_all();
+
+	if (strcmp(conf_format, "help") == 0) {
+		list_formats();
+		return 0;
+	}
+
 	mp_msg(MSGT_MUXER, MSGL_WARN, "** MUXER_LAVF *****************************************************************\n");
 	if (!conf_allow_lavf) {
 		mp_msg(MSGT_MUXER, MSGL_FATAL,
@@ -351,8 +365,6 @@
 	if(priv == NULL)
 		return 0;
 
-	av_register_all();
-	
 	priv->oc = av_alloc_format_context();
 	if(!priv->oc) 
 	{



More information about the MPlayer-cvslog mailing list