[FFmpeg-cvslog] r15285 - trunk/libavcodec/vorbis_enc.c
jai_menon
subversion
Tue Sep 9 16:42:50 CEST 2008
Author: jai_menon
Date: Tue Sep 9 16:42:50 2008
New Revision: 15285
Log:
vorbis_enc : set coded_frame->pts value to running sample count.
This is a temporary fix for issue 502 and will not be required when
we start using AVFrame for audio codecs.
Modified:
trunk/libavcodec/vorbis_enc.c
Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c (original)
+++ trunk/libavcodec/vorbis_enc.c Tue Sep 9 16:42:50 2008
@@ -118,6 +118,8 @@ typedef struct {
int nmodes;
vorbis_mode_t * modes;
+
+ int64_t sample_count;
} venc_context_t;
typedef struct {
@@ -1010,6 +1012,8 @@ static int vorbis_encode_frame(AVCodecCo
residue_encode(venc, &venc->residues[mapping->residue[mapping->mux[0]]], &pb, venc->coeffs, samples, venc->channels);
+ avccontext->coded_frame->pts = venc->sample_count;
+ venc->sample_count += avccontext->frame_size;
flush_put_bits(&pb);
return (put_bits_count(&pb) + 7) / 8;
}
More information about the ffmpeg-cvslog
mailing list