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.
This commit is contained in:
wm4 2013-04-15 21:22:41 +02:00
parent afd8d7f2db
commit 2adb1aaa5d
3 changed files with 1 additions and 7 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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