comparison vorbis_enc.c @ 7838:88f4153caa21 libavcodec

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.
author jai_menon
date Tue, 09 Sep 2008 14:42:50 +0000
parents 97383e012cb9
children a512ac8fa540
comparison
equal deleted inserted replaced
7837:20a0f6aba1cb 7838:88f4153caa21
116 int nmappings; 116 int nmappings;
117 mapping_t * mappings; 117 mapping_t * mappings;
118 118
119 int nmodes; 119 int nmodes;
120 vorbis_mode_t * modes; 120 vorbis_mode_t * modes;
121
122 int64_t sample_count;
121 } venc_context_t; 123 } venc_context_t;
122 124
123 typedef struct { 125 typedef struct {
124 int total; 126 int total;
125 int total_pos; 127 int total_pos;
1008 } 1010 }
1009 } 1011 }
1010 1012
1011 residue_encode(venc, &venc->residues[mapping->residue[mapping->mux[0]]], &pb, venc->coeffs, samples, venc->channels); 1013 residue_encode(venc, &venc->residues[mapping->residue[mapping->mux[0]]], &pb, venc->coeffs, samples, venc->channels);
1012 1014
1015 avccontext->coded_frame->pts = venc->sample_count;
1016 venc->sample_count += avccontext->frame_size;
1013 flush_put_bits(&pb); 1017 flush_put_bits(&pb);
1014 return (put_bits_count(&pb) + 7) / 8; 1018 return (put_bits_count(&pb) + 7) / 8;
1015 } 1019 }
1016 1020
1017 1021