summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-10 21:48:41 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-10 21:48:41 +0000
commitb85ad74dc94a27a6f0181a0c7a75d08798ec8e1d (patch)
treef9c52fccb5d3ecc50d667d3229183b69db6ae7c5 /libmpcodecs
parent0fb68cc0725695193565774843855906872f49c2 (diff)
downloadmpv-b85ad74dc94a27a6f0181a0c7a75d08798ec8e1d.tar.bz2
mpv-b85ad74dc94a27a6f0181a0c7a75d08798ec8e1d.tar.xz
pass average bitrate from encoder to (lavf) muxer
this fixes some problems with muxing mp4 files for the psp git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19366 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ae_lavc.c1
-rw-r--r--libmpcodecs/ve_lavc.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/libmpcodecs/ae_lavc.c b/libmpcodecs/ae_lavc.c
index 69b3530b3d..be909aa26e 100644
--- a/libmpcodecs/ae_lavc.c
+++ b/libmpcodecs/ae_lavc.c
@@ -38,6 +38,7 @@ static int bind_lavc(audio_encoder_t *encoder, muxer_stream_t *mux_a)
mux_a->wf->nChannels = lavc_actx->channels;
mux_a->wf->nSamplesPerSec = lavc_actx->sample_rate;
mux_a->wf->nAvgBytesPerSec = (lavc_actx->bit_rate / 8);
+ mux_a->avg_rate= lavc_actx->bit_rate;
mux_a->h.dwRate = mux_a->wf->nAvgBytesPerSec;
if(lavc_actx->block_align)
mux_a->h.dwSampleSize = mux_a->h.dwScale = lavc_actx->block_align;
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 5bf123daa2..dcfc7f4243 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -331,7 +331,7 @@ static int config(struct vf_instance_s* vf,
else
lavc_venc_context->bit_rate = 800000; /* default */
- //mux_v->wf->nAvgBytesPerSec= lavc_venc_context->bit_rate/8;
+ mux_v->avg_rate= lavc_venc_context->bit_rate;
lavc_venc_context->bit_rate_tolerance= lavc_param_vrate_tolerance*1000;
lavc_venc_context->time_base= (AVRational){mux_v->h.dwScale, mux_v->h.dwRate};