# HG changeset patch # User jai_menon # Date 1220971370 0 # Node ID 88f4153caa2164e1bdfd022aadb23c96d624859f # Parent 20a0f6aba1cb28a11c932d343f52e2241cc64cea 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. diff -r 20a0f6aba1cb -r 88f4153caa21 vorbis_enc.c --- a/vorbis_enc.c Mon Sep 08 23:47:50 2008 +0000 +++ b/vorbis_enc.c Tue Sep 09 14:42:50 2008 +0000 @@ -118,6 +118,8 @@ int nmodes; vorbis_mode_t * modes; + + int64_t sample_count; } venc_context_t; typedef struct { @@ -1010,6 +1012,8 @@ 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; }