Commit 0f2e247e authored by jai_menon's avatar jai_menon

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. 


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15285 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4616d353
...@@ -118,6 +118,8 @@ typedef struct { ...@@ -118,6 +118,8 @@ typedef struct {
int nmodes; int nmodes;
vorbis_mode_t * modes; vorbis_mode_t * modes;
int64_t sample_count;
} venc_context_t; } venc_context_t;
typedef struct { typedef struct {
...@@ -1010,6 +1012,8 @@ static int vorbis_encode_frame(AVCodecContext * avccontext, unsigned char * pack ...@@ -1010,6 +1012,8 @@ static int vorbis_encode_frame(AVCodecContext * avccontext, unsigned char * pack
residue_encode(venc, &venc->residues[mapping->residue[mapping->mux[0]]], &pb, venc->coeffs, samples, venc->channels); 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); flush_put_bits(&pb);
return (put_bits_count(&pb) + 7) / 8; return (put_bits_count(&pb) + 7) / 8;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment