diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-07 15:37:45 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-20 15:20:17 -0500 |
commit | 91a28b0e8e4f09a8256727e8a514bf98da81e186 (patch) | |
tree | f079d9cee0c0b4f51e5f5909d4cd98176a5dcf64 /libavcodec/libspeexenc.c | |
parent | 41ac9bb253c371e95abc854786334c857bbe4065 (diff) | |
download | ffmpeg-91a28b0e8e4f09a8256727e8a514bf98da81e186.tar.gz |
avcodec: add ff_samples_to_time_base() convenience function to internal.h
Diffstat (limited to 'libavcodec/libspeexenc.c')
-rw-r--r-- | libavcodec/libspeexenc.c | 5 |
1 files changed, 1 insertions, 4 deletions
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 <speex/speex.h> #include <speex/speex_header.h> #include <speex/speex_stereo.h> -#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)) { |