Browse Source

obs-ffmpeg: Use actual audio encoder sample rate

Uses the sample rate the audio encoder is running at for ffmpeg muxing
(in case the audio sample rate had to be changed by the encoder)
jp9000 10 years ago
parent
commit
ad3d448f19
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/obs-outputs/flv-mux.c

+ 1 - 1
plugins/obs-outputs/flv-mux.c

@@ -95,7 +95,7 @@ static bool build_flv_meta_data(obs_output_t *context,
 	enc_str_val(&enc, end, "audiocodecid", "mp4a");
 	enc_num_val(&enc, end, "audiodatarate", encoder_bitrate(aencoder));
 	enc_num_val(&enc, end, "audiosamplerate",
-			(double)audio_output_get_sample_rate(audio));
+			(double)obs_encoder_get_sample_rate(aencoder));
 	enc_num_val(&enc, end, "audiosamplesize", 16.0);
 	enc_num_val(&enc, end, "audiochannels",
 			(double)audio_output_get_channels(audio));