mirror of https://github.com/mpv-player/mpv
replaced bzero() with memset(); stream_type 0x0f is AAC
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14572 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
de4bb55470
commit
7111eacce7
|
@ -475,7 +475,7 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
|
||||||
req_spid = param->spid;
|
req_spid = param->spid;
|
||||||
|
|
||||||
has_tables = 0;
|
has_tables = 0;
|
||||||
bzero(pes_priv1, sizeof(pes_priv1));
|
memset(pes_priv1, 0, sizeof(pes_priv1));
|
||||||
init_pos = stream_tell(demuxer->stream);
|
init_pos = stream_tell(demuxer->stream);
|
||||||
mp_msg(MSGT_DEMUXER, MSGL_INFO, "PROBING UP TO %llu, PROG: %d\n", (uint64_t) param->probe, param->prog);
|
mp_msg(MSGT_DEMUXER, MSGL_INFO, "PROBING UP TO %llu, PROG: %d\n", (uint64_t) param->probe, param->prog);
|
||||||
while((pos <= init_pos + param->probe) && (! demuxer->stream->eof))
|
while((pos <= init_pos + param->probe) && (! demuxer->stream->eof))
|
||||||
|
@ -1065,7 +1065,7 @@ static int pes_parse2(unsigned char *buf, uint16_t packet_len, ES_stream_t *es,
|
||||||
uint32_t hdr, l = 0;
|
uint32_t hdr, l = 0;
|
||||||
|
|
||||||
hdr = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
|
hdr = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
|
||||||
if((hdr & 0xfff00000) == 0xfff00000)
|
if(pes_is_aligned && ((hdr & 0xfff00000) == 0xfff00000))
|
||||||
{
|
{
|
||||||
// ADTS AAC shows with MPA layer 4 (00 in the layer bitstream)
|
// ADTS AAC shows with MPA layer 4 (00 in the layer bitstream)
|
||||||
l = 4 - ((hdr & 0x00060000) >> 17);
|
l = 4 - ((hdr & 0x00060000) >> 17);
|
||||||
|
@ -1079,8 +1079,7 @@ static int pes_parse2(unsigned char *buf, uint16_t packet_len, ES_stream_t *es,
|
||||||
es->size = packet_len;
|
es->size = packet_len;
|
||||||
|
|
||||||
|
|
||||||
//if((type_from_pmt == 0x0f) || (l == 4)) //see in parse_pmt()
|
if((type_from_pmt == AUDIO_AAC) || (l == 4)) //see in parse_pmt()
|
||||||
if(l==4)
|
|
||||||
es->type = AUDIO_AAC;
|
es->type = AUDIO_AAC;
|
||||||
else
|
else
|
||||||
es->type = AUDIO_MP2;
|
es->type = AUDIO_MP2;
|
||||||
|
@ -1574,19 +1573,11 @@ static int parse_pmt(ts_priv_t * priv, uint16_t progid, uint16_t pid, int is_sta
|
||||||
case 0x10:
|
case 0x10:
|
||||||
pmt->es[idx].type = VIDEO_MPEG4;
|
pmt->es[idx].type = VIDEO_MPEG4;
|
||||||
break;
|
break;
|
||||||
|
case 0x0f:
|
||||||
case 0x11:
|
case 0x11:
|
||||||
parse_descriptors(&pmt->es[idx], &es_base[5]);
|
parse_descriptors(&pmt->es[idx], &es_base[5]);
|
||||||
pmt->es[idx].type = AUDIO_AAC;
|
pmt->es[idx].type = AUDIO_AAC;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* seems to indicate an AAC in a certain broadcaster's tables, but
|
|
||||||
it's deceiving, so it's commented out
|
|
||||||
case 0x0f:
|
|
||||||
parse_descriptors(&pmt->es[idx], &es_base[5]);
|
|
||||||
pmt->es[idx].type = 0x0f;
|
|
||||||
break;
|
|
||||||
*/
|
|
||||||
|
|
||||||
case 0x1b:
|
case 0x1b:
|
||||||
pmt->es[idx].type = VIDEO_H264;
|
pmt->es[idx].type = VIDEO_H264;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue