Mercurial > libavformat.hg
changeset 2086:0cd7cfbee2e8 libavformat
Don't forget about audio remaining in buffer, in case there is enough
left to make another DV frame.
author | corey |
---|---|
date | Wed, 16 May 2007 02:02:22 +0000 |
parents | 8fc44b349f59 |
children | fa4066708500 |
files | dvenc.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dvenc.c Tue May 15 14:58:30 2007 +0000 +++ b/dvenc.c Wed May 16 02:02:22 2007 +0000 @@ -266,13 +266,15 @@ /* Lets see if we have enough data to construct one DV frame */ if (c->has_video == 1 && c->has_audio + 1 == 1<<c->n_ast) { dv_inject_metadata(c, *frame); + c->has_audio = 0; for (i=0; i<c->n_ast; i++) { dv_inject_audio(c, i, *frame); av_fifo_drain(&c->audio_data[i], reqasize); + c->has_audio |= ((reqasize <= av_fifo_size(&c->audio_data[i])) << i); } c->has_video = 0; - c->has_audio = 0; + c->frames++; return c->sys->frame_size;