[MPlayer-cvslog] CVS: main/libmpdemux muxer_mpeg.c,1.48,1.49

Nico Sabbi CVS syncmail at mplayerhq.hu
Thu Apr 20 23:40:06 CEST 2006


CVS change done by Nico Sabbi CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv20859

Modified Files:
	muxer_mpeg.c 
Log Message:
removed useless (and broken as hell) buffering code from muxer1; buffering constraints will be fully respected when one of the forthcoming patches is applied

Index: muxer_mpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_mpeg.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- muxer_mpeg.c	20 Apr 2006 20:53:48 -0000	1.48
+++ muxer_mpeg.c	20 Apr 2006 21:40:03 -0000	1.49
@@ -201,15 +201,6 @@
 	}
 }
 
-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 @@
 				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 @@
   }
   
 
-  //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;




More information about the MPlayer-cvslog mailing list