Commit ad36c365 authored by gpoirier's avatar gpoirier

enables AVOption for muxing.

Patch by Takis
Original thread:
Date: Sep 8, 2006 10:58 AM
Subject: [Ffmpeg-devel] [PATCH] Enable AVOption for muxers


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6197 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 94d408f3
...@@ -3310,7 +3310,7 @@ static void opt_new_video_stream(void) ...@@ -3310,7 +3310,7 @@ static void opt_new_video_stream(void)
static void opt_output_file(const char *filename) static void opt_output_file(const char *filename)
{ {
AVFormatContext *oc; AVFormatContext *oc;
int use_video, use_audio, input_has_video, input_has_audio; int use_video, use_audio, input_has_video, input_has_audio, i;
AVFormatParameters params, *ap = &params; AVFormatParameters params, *ap = &params;
if (!strcmp(filename, "-")) if (!strcmp(filename, "-"))
...@@ -3442,6 +3442,13 @@ static void opt_output_file(const char *filename) ...@@ -3442,6 +3442,13 @@ static void opt_output_file(const char *filename)
oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE); oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE);
oc->loop_output = loop_output; oc->loop_output = loop_output;
for(i=0; i<opt_name_count; i++){
AVOption *opt;
double d = av_get_double(avformat_opts, opt_names[i], &opt);
if(d==d && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
av_set_double(oc, opt_names[i], d);
}
/* reset some options */ /* reset some options */
file_oformat = NULL; file_oformat = NULL;
file_iformat = NULL; file_iformat = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment