[MPlayer-cvslog] r36664 - trunk/libmpdemux/demux_ts.c
reimar
subversion at mplayerhq.hu
Mon Jan 20 23:08:33 CET 2014
Author: reimar
Date: Mon Jan 20 23:08:33 2014
New Revision: 36664
Log:
demux_ts: remove pointless stack variable and ts_parse argument.
Modified:
trunk/libmpdemux/demux_ts.c
Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c Mon Jan 20 20:58:10 2014 (r36663)
+++ trunk/libmpdemux/demux_ts.c Mon Jan 20 23:08:33 2014 (r36664)
@@ -299,7 +299,7 @@ static int IS_SUB(es_stream_type_t type)
return 0;
}
-static int ts_parse(demuxer_t *demuxer, ES_stream_t *es, unsigned char *packet, int probe);
+static int ts_parse(demuxer_t *demuxer, ES_stream_t *es, int probe);
static uint8_t get_packet_size(const unsigned char *buf, int size)
{
@@ -672,7 +672,6 @@ static off_t ts_detect_streams(demuxer_t
int32_t p, chosen_pid = 0;
off_t pos=0, ret = 0, init_pos, end_pos;
ES_stream_t es;
- unsigned char tmp[TS_FEC_PACKET_SIZE];
ts_priv_t *priv = (ts_priv_t*) demuxer->priv;
struct {
char *buf;
@@ -697,7 +696,7 @@ static off_t ts_detect_streams(demuxer_t
if(pos > end_pos || demuxer->stream->eof)
break;
- if(ts_parse(demuxer, &es, tmp, 1))
+ if(ts_parse(demuxer, &es, 1))
{
//Non PES-aligned A52 audio may escape detection if PMT is not present;
//in this case we try to find at least 3 A52 syncwords
@@ -2779,12 +2778,13 @@ static int fill_extradata(mp4_decoder_co
// 0 = EOF or no stream found
// else = [-] number of bytes written to the packet
-static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet, int probe)
+static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, int probe)
{
ES_stream_t *tss;
int buf_size, is_start, pid, base;
int len, cc, cc_ok, afc, retv = 0, is_video, is_audio, is_sub;
ts_priv_t * priv = (ts_priv_t*) demuxer->priv;
+ unsigned char *packet = priv->packet;
stream_t *stream = demuxer->stream;
char *p;
demux_stream_t *ds = NULL;
@@ -3351,9 +3351,8 @@ static void demux_seek_ts(demuxer_t *dem
static int demux_ts_fill_buffer(demuxer_t * demuxer, demux_stream_t *ds)
{
ES_stream_t es;
- ts_priv_t *priv = (ts_priv_t *)demuxer->priv;
- return -ts_parse(demuxer, &es, priv->packet, 0);
+ return -ts_parse(demuxer, &es, 0);
}
More information about the MPlayer-cvslog
mailing list