From a3d930afbefc6a7e74e89b94b0facead0734d6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 1 Dec 2012 23:21:41 +0000 Subject: [PATCH] avaudenc: use sample rate as ticks per second fallback The 25/1 value presumably came from the video encoder class. --- ext/libav/gstavaudenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/libav/gstavaudenc.c b/ext/libav/gstavaudenc.c index b9a1a394ef..6d0144789f 100644 --- a/ext/libav/gstavaudenc.c +++ b/ext/libav/gstavaudenc.c @@ -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; }