[MPlayer-cvslog] r22249 - trunk/libmpdemux/demux_ts.c

nicodvb subversion at mplayerhq.hu
Sat Feb 17 18:24:08 CET 2007


Author: nicodvb
Date: Sat Feb 17 18:24:07 2007
New Revision: 22249

Modified:
   trunk/libmpdemux/demux_ts.c

Log:
cosmetics

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	(original)
+++ trunk/libmpdemux/demux_ts.c	Sat Feb 17 18:24:07 2007
@@ -2460,7 +2460,7 @@
 						return &(priv->pmt[i]);
 					}
 				}
-			}	
+			}
 		}
 	}
 	
@@ -2528,34 +2528,34 @@
 
 	if((*dp != NULL) && (*dp_offset > 0))
 	{
-			ret = *dp_offset;
-			resize_demux_packet(*dp, ret);	//shrinked to the right size
-			ds_add_packet(ds, *dp);
-			mp_msg(MSGT_DEMUX, MSGL_DBG2, "ADDED %d  bytes to %s fifo, PTS=%.3f\n", ret, (ds == demuxer->audio ? "audio" : (ds == demuxer->video ? "video" : "sub")), (*dp)->pts);
-			if(si)
-			{
-				float diff = (*dp)->pts - si->last_pts;
-				float dur;
+		ret = *dp_offset;
+		resize_demux_packet(*dp, ret);	//shrinked to the right size
+		ds_add_packet(ds, *dp);
+		mp_msg(MSGT_DEMUX, MSGL_DBG2, "ADDED %d  bytes to %s fifo, PTS=%.3f\n", ret, (ds == demuxer->audio ? "audio" : (ds == demuxer->video ? "video" : "sub")), (*dp)->pts);
+		if(si)
+		{
+			float diff = (*dp)->pts - si->last_pts;
+			float dur;
 
-				if(abs(diff) > 1) //1 second, there's a discontinuity
-				{
-					si->duration += si->last_pts - si->first_pts;
-					si->first_pts = si->last_pts = (*dp)->pts;
-				}
-				else
-				{
-					si->last_pts = (*dp)->pts;
-				}
-				si->size += ret;
-				dur = si->duration + (si->last_pts - si->first_pts);
+			if(abs(diff) > 1) //1 second, there's a discontinuity
+			{
+				si->duration += si->last_pts - si->first_pts;
+				si->first_pts = si->last_pts = (*dp)->pts;
+			}
+			else
+			{
+				si->last_pts = (*dp)->pts;
+			}
+			si->size += ret;
+			dur = si->duration + (si->last_pts - si->first_pts);
 
-				if(dur > 0 && ds == demuxer->video)
-				{
-					ts_priv_t * priv = (ts_priv_t*) demuxer->priv;
-					if(dur > 1)	//otherwise it may be unreliable
-						priv->vbitrate = (uint32_t) ((float) si->size / dur);
-				}
+			if(dur > 0 && ds == demuxer->video)
+			{
+				ts_priv_t * priv = (ts_priv_t*) demuxer->priv;
+				if(dur > 1)	//otherwise it may be unreliable
+					priv->vbitrate = (uint32_t) ((float) si->size / dur);
 			}
+		}
 	}
 
 	*dp = NULL;
@@ -3101,7 +3101,6 @@
 	else
 	{
 		// time seek (secs)
-
 		if(! video_stats) // unspecified or VBR
 			newpos += 2324*75*rel_seek_secs; // 174.3 kbyte/sec
 		else
@@ -3152,10 +3151,8 @@
 		{
 			if(i==0x1B3 || i==0x1B8) break; // found it!
 		}
-		else if(sh_video->format == VIDEO_MPEG4)
-		{
-			if(i==0x1B6) break; // found it!
-		}
+		else if((sh_video->format == VIDEO_MPEG4) && (i==0x1B6))
+			break;
 		else if(sh_video->format == VIDEO_VC1 && (i==0x10E || i==0x10F))
 			break;
 		else	//H264



More information about the MPlayer-cvslog mailing list