On Tue, 14 Jun 2011 09:24:48 -0400, Justin Ruggles <[email protected]> 
wrote:
> On 06/14/2011 06:58 AM, Anton Khirnov wrote:
> 
> > -    memset(ap, 0, sizeof(*ap));
> > -    ap->prealloced_context = 1;
> > -    ap->sample_rate = audio_sample_rate;
> > -    ap->channels = audio_channels;
> > -    ap->time_base.den = frame_rate.num;
> > -    ap->time_base.num = frame_rate.den;
> > -    ap->width = frame_width;
> > -    ap->height = frame_height;
> > -    ap->pix_fmt = frame_pix_fmt;
> > -   // ap->sample_fmt = audio_sample_fmt; //FIXME:not implemented in 
> > libavformat
> > -    ap->channel = video_channel;
> > -    ap->standard = video_standard;
> > -
> > -    set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL);
> 
> 
> Can these at least be emulated temporarily using the associated demuxer
> private options?  I fear there could be some weird side effects and
> confusion for users by changing the commandline behavior for demuxers only.
> 

I'd like them to be emulated permanently, but it's not as easy as it looks.

For example, take -ar. It sets an audio_sample_rate global, which is initialized
to a default value of 44100, so i can't easily check if the user set it
or not.
Further, it gets set in opt_input_file() from the audio stream value,
for some nefarious future use. I can only guess how it's really supposed
to work and most probably it only does what it's meant to in case of one
input and one output file.
In any case, touching it is likely to break something else.

--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to