Mercurial > mplayer.hg
changeset 22198:0d59af1f4156
Print list of lavf muxer formats with format=help.
author | reimar |
---|---|
date | Wed, 14 Feb 2007 11:06:59 +0000 |
parents | ebf5462a08b7 |
children | cc89992b27a3 |
files | libmpdemux/muxer_lavf.c |
diffstat | 1 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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) {