From 91a28b0e8e4f09a8256727e8a514bf98da81e186 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 7 Feb 2012 15:37:45 -0500 Subject: avcodec: add ff_samples_to_time_base() convenience function to internal.h --- libavcodec/libspeexenc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libavcodec/libspeexenc.c') diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c index bccf9c810d..73a1d4e8c2 100644 --- a/libavcodec/libspeexenc.c +++ b/libavcodec/libspeexenc.c @@ -67,7 +67,6 @@ #include #include #include -#include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "avcodec.h" #include "internal.h" @@ -258,9 +257,7 @@ static int encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, /* write output if all frames for the packet have been encoded */ if (s->pkt_frame_count == s->frames_per_packet) { s->pkt_frame_count = 0; - avctx->coded_frame->pts = - av_rescale_q(s->next_pts, (AVRational){ 1, avctx->sample_rate }, - avctx->time_base); + avctx->coded_frame->pts = ff_samples_to_time_base(avctx, s->next_pts); s->next_pts += s->pkt_sample_count; s->pkt_sample_count = 0; if (buf_size > speex_bits_nbytes(&s->bits)) { -- cgit v1.2.3