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

nicodvb subversion at mplayerhq.hu
Sat Oct 28 11:52:19 CEST 2006


Author: nicodvb
Date: Sat Oct 28 11:52:19 2006
New Revision: 20483

Modified:
   trunk/libmpdemux/demux_ts.c

Log:
reformatted ts_parse() after previous commit

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	(original)
+++ trunk/libmpdemux/demux_ts.c	Sat Oct 28 11:52:19 2006
@@ -2792,16 +2792,16 @@
 
 						if(dvdsub_lang)
 						{
-						if(!strcmp(dvdsub_lang, ""))
-							asgn = 1;
-						else
-						{
-							lang = pid_lang_from_pmt(priv, pid);
-							if(lang != NULL)
-								asgn = (strncmp(lang, dvdsub_lang, 3) == 0);
+							if(!strcmp(dvdsub_lang, ""))
+								asgn = 1;
 							else
-								asgn = 0;
-						}
+							{
+								lang = pid_lang_from_pmt(priv, pid);
+								if(lang != NULL)
+									asgn = (strncmp(lang, dvdsub_lang, 3) == 0);
+								else
+									asgn = 0;
+							}
 						}
 
 						if(asgn)
@@ -2887,19 +2887,19 @@
 					return 0;
 				
 				tss->payload_size = es->payload_size;
-					tss->type = es->type;
-					tss->subtype = es->subtype;
-					
-					if(is_audio)
-						lang = pid_lang_from_pmt(priv, es->pid);
-					if(lang != NULL)
-					{
-						memcpy(es->lang, lang, 3);
-						es->lang[3] = 0;
-					}
-					else
-						es->lang[0] = 0;
-					return 1;
+				tss->type = es->type;
+				tss->subtype = es->subtype;
+				
+				if(is_audio)
+					lang = pid_lang_from_pmt(priv, es->pid);
+				if(lang != NULL)
+				{
+					memcpy(es->lang, lang, 3);
+					es->lang[3] = 0;
+				}
+				else
+					es->lang[0] = 0;
+				return 1;
 			}
 			else
 			{
@@ -2915,18 +2915,18 @@
 
 				demuxer->filepos = stream_tell(demuxer->stream) - es->size;
 
-						if(*dp_offset + es->size > *buffer_size)
-						{
-							*buffer_size = *dp_offset + es->size + TS_FEC_PACKET_SIZE;
-							resize_demux_packet(*dp, *buffer_size);
-							//we'll skip at least one RESIZE() in the next iteration of ts_parse()
-							mp_msg(MSGT_DEMUX, MSGL_DBG2, "RESIZE DP TO %d\n", *buffer_size);
-						}
-						memcpy(&((*dp)->buffer[*dp_offset]), es->start, es->size);
-						*dp_offset += es->size;
-						(*dp)->flags = 0;
-						(*dp)->pos = stream_tell(demuxer->stream);
-						(*dp)->pts = es->pts;
+				if(*dp_offset + es->size > *buffer_size)
+				{
+					*buffer_size = *dp_offset + es->size + TS_FEC_PACKET_SIZE;
+					resize_demux_packet(*dp, *buffer_size);
+					//we'll skip at least one RESIZE() in the next iteration of ts_parse()
+					mp_msg(MSGT_DEMUX, MSGL_DBG2, "RESIZE DP TO %d\n", *buffer_size);
+				}
+				memcpy(&((*dp)->buffer[*dp_offset]), es->start, es->size);
+				*dp_offset += es->size;
+				(*dp)->flags = 0;
+				(*dp)->pos = stream_tell(demuxer->stream);
+				(*dp)->pts = es->pts;
 
 				if(*dp_offset >= MAX_PACK_BYTES)
 				{



More information about the MPlayer-cvslog mailing list