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

reimar subversion at mplayerhq.hu
Sun Nov 28 19:02:50 CET 2010


Author: reimar
Date: Sun Nov 28 19:02:50 2010
New Revision: 32667

Log:
Fix TS files with MP4 ES AAC descriptor to be correctly recognized
as AAC and not AAC in LATM.
This fixes playback of http://samples.mplayerhq.hu/A-codecs/AAC/freetv_aac_latm.ts,
actual LATM samples seem unaffected.

Modified:
   trunk/libmpdemux/demux_ts.c

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	Sun Nov 28 17:10:56 2010	(r32666)
+++ trunk/libmpdemux/demux_ts.c	Sun Nov 28 19:02:50 2010	(r32667)
@@ -2347,8 +2347,9 @@ static int parse_descriptors(struct pmt_
 				mp_msg(MSGT_DEMUX, MSGL_DBG2, "FORMAT %s\n", es->format_descriptor);
 			}
 		}
-		else if(ptr[j] == 0x1e)
+		else if(ptr[j] == 0x1e || ptr[j] == 0x1f)
 		{
+			// 0x1f is FMC, but currently it is easiest to handle them the same way
 			es->mp4_es_id = (ptr[j+2] << 8) | ptr[j+3];
 			mp_msg(MSGT_DEMUX, MSGL_V, "SL Descriptor: ES_ID: %d(%x), pid: %d\n", es->mp4_es_id, es->mp4_es_id, es->pid);
 		}
@@ -2400,6 +2401,7 @@ static int parse_pmt(ts_priv_t * priv, u
 	struct pmt_es_t *tmp_es;
 	ts_section_t *section;
 	ES_stream_t *tss;
+	int i;
 
 	idx = progid_idx_in_pmt(priv, progid);
 
@@ -2522,6 +2524,10 @@ static int parse_pmt(ts_priv_t * priv, u
 				break;
 			case 0x11:
 				pmt->es[idx].type = AUDIO_AAC_LATM;
+				for (i = 0; i < pmt->mp4es_cnt; i++)
+					if (pmt->mp4es[i].id == pmt->es[idx].mp4_es_id &&
+					    pmt->mp4es[i].decoder.object_type == AUDIO_AAC)
+						pmt->es[idx].type = AUDIO_AAC;
 				break;
 			case 0x1b:
 				pmt->es[idx].type = VIDEO_H264;


More information about the MPlayer-cvslog mailing list