On Mon, Jan 8, 2018 at 1:38 AM, Rostislav Pehlivanov <atomnu...@gmail.com> wrote: > > That's okay - for encoding switch the profile depending on both the > avctx->profile setting and the samplerate and list all supported > samplerates for all profiles in the AVCodec structure. We do something > similar in the AAC encoder where we pick different settings depending on > the profile and change the profile depending on the settings listed. > If there's an overlap, pick a sane default unless the user forces a profile > using profile:a. If forced and the samplerate isn't supported - error out > and let the user know. > For decoding set the profile via the demuxer. There doesn't have to be just > one demuxer for a codec. If there are major changes in how you parse > profiles go ahead and make a new one which sets the codec ID and the > profile. >
I don't think there is any precedent for "profile" being mandatory for a decoder to work, so that might be iffy. Decoders usually set profile, don't require it. ie. from the docs: * - decoding: Set by libavcodec. There is plenty precedent for using "codec_tag" however, so that may be a better choice - and can hold the tag from the "container" as-is as well. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel