Browse Source

Request global headers from ffmpeg aac encoder

FAAC and FDK AAC don't populate AVCodecContext::extradata{_size} unless
CODEC_FLAG_GLOBAL_HEADER is set
Palana 11 years ago
parent
commit
b9c544969e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      plugins/obs-ffmpeg/obs-ffmpeg-aac.c

+ 2 - 0
plugins/obs-ffmpeg/obs-ffmpeg-aac.c

@@ -160,6 +160,8 @@ static void *aac_create(obs_data_t settings, obs_encoder_t encoder)
 	/* enable experimental FFmpeg encoder if the only one available */
 	enc->context->strict_std_compliance = -2;
 
+	enc->context->flags = CODEC_FLAG_GLOBAL_HEADER;
+
 	if (initialize_codec(enc))
 		return enc;