Mercurial > mplayer.hg
changeset 36568:323fb622da7e
demux_ts: remove pointless stack variable and ts_parse argument.
author | reimar |
---|---|
date | Mon, 20 Jan 2014 22:08:33 +0000 |
parents | 46747640f884 |
children | 6ff73f13785c |
files | libmpdemux/demux_ts.c |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c Mon Jan 20 19:58:10 2014 +0000 +++ b/libmpdemux/demux_ts.c Mon Jan 20 22:08:33 2014 +0000 @@ -299,7 +299,7 @@ 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 @@ 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 @@ 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 @@ // 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 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); }