]> git.sesse.net Git - nageru/commitdiff
Set global headers to fix some issues with AAC over HTTP.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 17 Apr 2016 22:12:08 +0000 (00:12 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 17 Apr 2016 22:12:08 +0000 (00:12 +0200)
h264encode.cpp

index 36d94771d69ed2c1df4ea17e98525dfc73f6d78c..ae60763a3f0de335704feab7df533729b5d5d941 100644 (file)
@@ -1843,6 +1843,7 @@ void init_audio_encoder(const string &codec_name, int bit_rate, AVCodecContext *
        context_audio->channels = 2;
        context_audio->channel_layout = AV_CH_LAYOUT_STEREO;
        context_audio->time_base = AVRational{1, TIMEBASE};
+       context_audio->flags |= CODEC_FLAG_GLOBAL_HEADER;
        if (avcodec_open2(context_audio, codec_audio, NULL) < 0) {
                fprintf(stderr, "Could not open codec '%s'\n", codec_name.c_str());
                exit(1);