mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:33:46 +01:00
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:
parent
afd8d7f2db
commit
2adb1aaa5d
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user