# HG changeset patch # User reimar # Date 1171451219 0 # Node ID 0d59af1f4156d59fd91a50389fbd649adb705e6a # Parent ebf5462a08b7746e602bf5f1299cf9959bca41ff Print list of lavf muxer formats with format=help. diff -r ebf5462a08b7 -r 0d59af1f4156 libmpdemux/muxer_lavf.c --- a/libmpdemux/muxer_lavf.c Wed Feb 14 00:19:33 2007 +0000 +++ b/libmpdemux/muxer_lavf.c Wed Feb 14 11:06:59 2007 +0000 @@ -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) {