mirror of https://github.com/mpv-player/mpv
Print list of lavf muxer formats with format=help.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22216 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
44efd391cf
commit
807a81cf69
|
@ -322,6 +322,13 @@ static void write_trailer(muxer_t *muxer)
|
|||
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 @@ int muxer_init_muxer_lavf(muxer_t *muxer)
|
|||
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 @@ int muxer_init_muxer_lavf(muxer_t *muxer)
|
|||
if(priv == NULL)
|
||||
return 0;
|
||||
|
||||
av_register_all();
|
||||
|
||||
priv->oc = av_alloc_format_context();
|
||||
if(!priv->oc)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue