mirror of https://github.com/mpv-player/mpv
demux_ts.c: cleanup
Remove some useless casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31921 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove an unused variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31922 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify ts_sync. Might also make it easier to optimize a bit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31923 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
51385c6851
commit
1e403d0593
|
@ -1657,16 +1657,13 @@ static int pes_parse2(unsigned char *buf, uint16_t packet_len, ES_stream_t *es,
|
||||||
|
|
||||||
static int ts_sync(stream_t *stream)
|
static int ts_sync(stream_t *stream)
|
||||||
{
|
{
|
||||||
int c=0;
|
|
||||||
|
|
||||||
mp_msg(MSGT_DEMUX, MSGL_DBG3, "TS_SYNC \n");
|
mp_msg(MSGT_DEMUX, MSGL_DBG3, "TS_SYNC \n");
|
||||||
|
|
||||||
while(((c=stream_read_char(stream)) != 0x47) && ! stream->eof);
|
while (!stream->eof)
|
||||||
|
if (stream_read_char(stream) == 0x47)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if(c == 0x47)
|
return 0;
|
||||||
return c;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2783,7 +2780,6 @@ static int fill_extradata(mp4_decoder_config_t * mp4_dec, ES_stream_t *tss)
|
||||||
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, unsigned char *packet, int probe)
|
||||||
{
|
{
|
||||||
ES_stream_t *tss;
|
ES_stream_t *tss;
|
||||||
uint8_t done = 0;
|
|
||||||
int buf_size, is_start, pid, base;
|
int buf_size, is_start, pid, base;
|
||||||
int len, cc, cc_ok, afc, retv = 0, is_video, is_audio, is_sub;
|
int len, cc, cc_ok, afc, retv = 0, is_video, is_audio, is_sub;
|
||||||
ts_priv_t * priv = (ts_priv_t*) demuxer->priv;
|
ts_priv_t * priv = (ts_priv_t*) demuxer->priv;
|
||||||
|
@ -2799,11 +2795,11 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
|
||||||
TS_stream_info *si;
|
TS_stream_info *si;
|
||||||
|
|
||||||
|
|
||||||
while(! done)
|
while(1)
|
||||||
{
|
{
|
||||||
bad = ts_error = 0;
|
bad = ts_error = 0;
|
||||||
ds = (demux_stream_t*) NULL;
|
ds = NULL;
|
||||||
dp = (demux_packet_t **) NULL;
|
dp = NULL;
|
||||||
dp_offset = buffer_size = NULL;
|
dp_offset = buffer_size = NULL;
|
||||||
rap_flag = 0;
|
rap_flag = 0;
|
||||||
mp4_dec = NULL;
|
mp4_dec = NULL;
|
||||||
|
|
Loading…
Reference in New Issue