+ oformat = av_guess_format(global_flags.stream_mux_name.c_str(), nullptr, nullptr);
+ assert(oformat != nullptr);
+ if (global_flags.stream_audio_codec_name.empty()) {
+ stream_audio_encoder.reset(new AudioEncoder(AUDIO_OUTPUT_CODEC_NAME, DEFAULT_AUDIO_OUTPUT_BIT_RATE, oformat));
+ } else {
+ stream_audio_encoder.reset(new AudioEncoder(global_flags.stream_audio_codec_name, global_flags.stream_audio_codec_bitrate, oformat));
+ }
+ if (global_flags.x264_video_to_http) {
+ x264_encoder.reset(new X264Encoder(oformat));
+ }