summaryrefslogtreecommitdiff
path: root/libavcodec/oggvorbis.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/oggvorbis.c')
-rw-r--r--libavcodec/oggvorbis.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/oggvorbis.c b/libavcodec/oggvorbis.c
index 8358411964..e5dd106424 100644
--- a/libavcodec/oggvorbis.c
+++ b/libavcodec/oggvorbis.c
@@ -140,7 +140,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avccontext,
op2->packet = context->buffer + sizeof(ogg_packet);
l= op2->bytes;
- avccontext->coded_frame->pts= av_rescale(op2->granulepos, AV_TIME_BASE, avccontext->sample_rate);
+ avccontext->coded_frame->pts= op2->granulepos;
memcpy(packets, op2->packet, l);
context->buffer_index -= l + sizeof(ogg_packet);
@@ -203,6 +203,7 @@ static int oggvorbis_decode_init(AVCodecContext *avccontext) {
}
avccontext->channels = context->vi.channels;
avccontext->sample_rate = context->vi.rate;
+ avccontext->time_base= (AVRational){1, avccontext->sample_rate};
vorbis_synthesis_init(&context->vd, &context->vi);
vorbis_block_init(&context->vd, &context->vb);