summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-20 21:40:03 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-20 21:40:03 +0000
commit26b3c3f9ca2fc184786702dfffc6ad7876764065 (patch)
tree1e93581d9c037708aebeeb84df08cadd36beaf3f /libmpdemux
parent280b8e387541ef3d4931600afccd63e92b8fd2c2 (diff)
downloadmpv-26b3c3f9ca2fc184786702dfffc6ad7876764065.tar.bz2
mpv-26b3c3f9ca2fc184786702dfffc6ad7876764065.tar.xz
removed useless (and broken as hell) buffering code from muxer1; buffering constraints will be fully respected when one of the forthcoming patches is applied
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18167 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/muxer_mpeg.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c
index e0820e4965..d03012da7e 100644
--- a/libmpdemux/muxer_mpeg.c
+++ b/libmpdemux/muxer_mpeg.c
@@ -201,15 +201,6 @@ static void fix_audio_sys_header(muxer_priv_t *priv, uint8_t id, uint8_t newid,
}
}
-static void fix_buffer_params(muxer_priv_t *priv, uint8_t id, uint32_t size)
-{
- uint8_t i;
-
- for(i = 0; i < priv->sys_info.cnt; i++)
- if(priv->sys_info.streams[i].id == id)
- priv->sys_info.streams[i].bufsize = size;
-}
-
static inline int is_mpeg1(uint32_t x)
{
return (
@@ -2019,36 +2010,13 @@ static size_t parse_mpeg12_video(muxer_stream_t *s, muxer_priv_t *priv, muxer_he
ptr = tmp;
}
}
-
- switch (pt) {
- case 2: // predictive
- if (s->ipb[0]) {
- sz = len + s->ipb[0];
- s->ipb[0] = max(s->ipb[0], s->ipb[2]);
- s->ipb[2] = 0;
- } else if (s->ipb[2]) {
- sz = len + s->ipb[2];
- s->ipb[0] = s->ipb[2];
- s->ipb[2] = 0;
- } else
- sz = 4 * len; // no bidirectional frames yet?
-
- s->ipb[1] = len;
- break;
- case 3: // bidirectional
- s->ipb[2] += len;
- sz = s->ipb[1] + s->ipb[2];
- break;
- default: // intra-coded
- sz = len; // no extra buffer for it...
- }
spriv->vframes++;
add_frame(spriv, spriv->delta_pts, s->buffer, len, pt, temp_ref);
}
mp_msg(MSGT_MUXER, MSGL_DBG2,"parse_mpeg12_video, return %u\n", (uint32_t) len);
- return sz;
+ return len;
}
@@ -2524,15 +2492,6 @@ static void mpegfile_write_chunk(muxer_stream_t *s,size_t len,unsigned int flags
}
- //if genmpeg1/2 and sz > last buffer size in the system header we must write the new sysheader
- if(sz > s->h.dwSuggestedBufferSize) { // increase and set STD
- s->h.dwSuggestedBufferSize = sz;
- if(priv->is_genmpeg1 || priv->is_genmpeg2) {
- fix_buffer_params(priv, spriv->id, s->h.dwSuggestedBufferSize);
- priv->update_system_header = 1;
- }
- }
-
if(spriv->psm_fixed == 0) {
add_to_psm(priv, spriv->id, stream_format);
spriv->psm_fixed = 1;