diff options
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/aviwrite.c | 2 | ||||
-rw-r--r-- | libmpdemux/aviwrite.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/libmpdemux/aviwrite.c b/libmpdemux/aviwrite.c index 4dcc821358..be5f5977ae 100644 --- a/libmpdemux/aviwrite.c +++ b/libmpdemux/aviwrite.c @@ -28,6 +28,7 @@ aviwrite_stream_t* aviwrite_new_stream(aviwrite_t *muxer,int type){ s->type=type; s->id=muxer->avih.dwStreams; s->timer=0.0; + s->size=0; switch(type){ case AVIWRITE_TYPE_VIDEO: s->ckid=mmioFOURCC(('0'+s->id/10),('0'+(s->id%10)),'d','c'); @@ -103,6 +104,7 @@ void aviwrite_write_chunk(aviwrite_t *muxer,aviwrite_stream_t *s, FILE *f,int le s->h.dwLength++; } s->timer=(double)s->h.dwLength*s->h.dwScale/s->h.dwRate; + s->size+=len; if(len>s->h.dwSuggestedBufferSize) s->h.dwSuggestedBufferSize=len; } diff --git a/libmpdemux/aviwrite.h b/libmpdemux/aviwrite.h index b6a27a0926..f1a9fb6bb6 100644 --- a/libmpdemux/aviwrite.h +++ b/libmpdemux/aviwrite.h @@ -10,6 +10,7 @@ typedef struct { int id; // stream no unsigned int ckid; // chunk id (00dc 01wb etc) double timer; + unsigned int size; // buffering: unsigned char *buffer; unsigned int buffer_size; |