summaryrefslogtreecommitdiffstats
path: root/libmpdemux/muxer_lavf.c
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-11-21 22:53:14 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-11-21 22:53:14 +0000
commit7a8f8317fd501364b3c76156189c2100d338097f (patch)
treecb87cf317d3646b72ff50a0cb45d1a89142fd430 /libmpdemux/muxer_lavf.c
parent76b842a3c1afc5385ac9dc060be99fae43121eaa (diff)
downloadmpv-7a8f8317fd501364b3c76156189c2100d338097f.tar.bz2
mpv-7a8f8317fd501364b3c76156189c2100d338097f.tar.xz
buffering in the muxer layer; patch by Corey Hickey (bugfood-ml ad fatooh punctum org) plus small fixes by me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17024 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/muxer_lavf.c')
-rw-r--r--libmpdemux/muxer_lavf.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c
index 98f4b2dc96..a2e1b5888b 100644
--- a/libmpdemux/muxer_lavf.c
+++ b/libmpdemux/muxer_lavf.c
@@ -103,6 +103,7 @@ static muxer_stream_t* lavf_new_stream(muxer_t *muxer, int type)
mp_msg(MSGT_MUXER, MSGL_ERR, "Could not alloc muxer_stream, EXIT\n");
return NULL;
}
+ muxer->streams[muxer->avih.dwStreams] = stream;
stream->b_buffer = (unsigned char *)malloc(2048);
if(!stream->b_buffer)
{
@@ -230,8 +231,6 @@ static void write_chunk(muxer_stream_t *stream, size_t len, unsigned int flags)
muxer_stream_priv_t *spriv = (muxer_stream_priv_t *) stream->priv;
AVPacket pkt;
- stream->size += len;
-
if(len)
{
av_init_packet(&pkt);
@@ -259,12 +258,6 @@ static void write_chunk(muxer_stream_t *stream, size_t len, unsigned int flags)
}
}
- if(stream->h.dwSampleSize) // CBR
- stream->h.dwLength += len / stream->h.dwSampleSize;
- else // VBR
- stream->h.dwLength++;
-
- stream->timer = (double) stream->h.dwLength * stream->h.dwScale / stream->h.dwRate;
return;
}