FFmpeg/FFmpeg — pull request #95 by vkalinsky (2014-11-12 17:43:31+00:00)
Title: Set AVCodecContext->codec upon initialization.

As far as i understand, currently we have to initialize AVCodecContext->codec manually, in order to be able to call av_opt_set.

AVStream* stream = avformat_new_stream(output_context, codec);
stream->codec->codec = codec; // // Otherwise next line fails, because stream->codec->codec is null
av_opt_set( stream->codec, "tune", "zerolatency", AV_OPT_SEARCH_CHILDREN );

That's weird because avcodec_get_context_defaults3 has AVCodec* in parameter.

FATE ok with that.