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/libvorbis.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/libvorbis.c')
-rw-r--r-- | libavcodec/libvorbis.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c index 25e600671f..4d58fdc34e 100644 --- a/libavcodec/libvorbis.c +++ b/libavcodec/libvorbis.c @@ -29,8 +29,8 @@ #include "libavutil/opt.h" #include "avcodec.h" #include "bytestream.h" +#include "internal.h" #include "vorbis.h" -#include "libavutil/mathematics.h" #undef NDEBUG #include <assert.h> @@ -216,7 +216,8 @@ static int oggvorbis_encode_frame(AVCodecContext *avccontext, op2->packet = context->buffer + sizeof(ogg_packet); l = op2->bytes; - avccontext->coded_frame->pts = av_rescale_q(op2->granulepos, (AVRational) { 1, avccontext->sample_rate }, avccontext->time_base); + avccontext->coded_frame->pts = ff_samples_to_time_base(avccontext, + op2->granulepos); //FIXME we should reorder the user supplied pts and not assume that they are spaced by 1/sample_rate if (l > buf_size) { |