avaudenc: use sample rate as ticks per second fallback

The 25/1 value presumably came from the video encoder class.
This commit is contained in:
Tim-Philipp Müller 2012-12-01 23:21:41 +00:00
parent 819d4d2a04
commit a3d930afbe

View file

@ -275,7 +275,7 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
/* fetch pix_fmt and so on */
gst_ffmpeg_audioinfo_to_context (info, ffmpegaudenc->context);
if (!ffmpegaudenc->context->time_base.den) {
ffmpegaudenc->context->time_base.den = 25;
ffmpegaudenc->context->time_base.den = GST_AUDIO_INFO_RATE (info);
ffmpegaudenc->context->time_base.num = 1;
ffmpegaudenc->context->ticks_per_frame = 1;
}