From 2adb1aaa5d5e7a8240cab8afba639b768e486fca Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 15 Apr 2013 21:22:41 +0200 Subject: [PATCH] demux: remove useless vid/aid/sid fields Only demux_ts.c used sid in one case, replace that by reading the same value from another location. --- demux/demux.c | 3 --- demux/demux_ts.c | 2 +- demux/stheader.h | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/demux/demux.c b/demux/demux.c index 7d76bfa56e..c23185c90b 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -279,7 +279,6 @@ static struct sh_stream *new_sh_stream_id(demuxer_t *demuxer, switch (sh->type) { case STREAM_VIDEO: { struct sh_video *sht = talloc_zero(demuxer, struct sh_video); - sht->vid = sh->tid; sht->ds = demuxer->video; sh->video = sht; sh->common_header = (struct sh_common *) sht; @@ -288,7 +287,6 @@ static struct sh_stream *new_sh_stream_id(demuxer_t *demuxer, } case STREAM_AUDIO: { struct sh_audio *sht = talloc_zero(demuxer, struct sh_audio); - sht->aid = tid; sht->ds = demuxer->audio; sht->samplesize = 2; sht->sample_format = AF_FORMAT_S16_NE; @@ -299,7 +297,6 @@ static struct sh_stream *new_sh_stream_id(demuxer_t *demuxer, } case STREAM_SUB: { struct sh_sub *sht = talloc_zero(demuxer, struct sh_sub); - sht->sid = tid; sht->ds = demuxer->sub; sh->sub = sht; sh->common_header = (struct sh_common *) sht; diff --git a/demux/demux_ts.c b/demux/demux_ts.c index 42da41d532..ac23f0e71b 100644 --- a/demux/demux_ts.c +++ b/demux/demux_ts.c @@ -2986,7 +2986,7 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet, { sh_sub_t *sh_sub = demuxer->sub->sh; - if(sh_sub && sh_sub->sid == tss->pid) + if(sh_sub && sh_sub->gsh->tid == tss->pid) { ds = demuxer->sub; diff --git a/demux/stheader.h b/demux/stheader.h index 03fdf4d2ea..2fe1ac40c5 100644 --- a/demux/stheader.h +++ b/demux/stheader.h @@ -102,7 +102,6 @@ typedef struct sh_common { typedef struct sh_audio { SH_COMMON - int aid; // output format: int sample_format; int samplerate; @@ -134,7 +133,6 @@ typedef struct sh_audio { typedef struct sh_video { SH_COMMON - int vid; float timer; // absolute time in video stream, since last start/seek // frame counters: float num_frames; // number of frames played @@ -173,7 +171,6 @@ typedef struct sh_video { typedef struct sh_sub { SH_COMMON - int sid; char type; // t = text, v = VobSub, a = SSA/ASS, m, x, b, d, p bool active; // after track switch decoder may stay initialized, not active unsigned char *extradata; // extra header data passed from demuxer