mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
Declare demuxer *_streams fields with proper types
Give sh_audio_t, sh_video_t and sh_sub_t which before had typedef names only a matching struct name (without _t) too. Change the a_streams, v_streams and s_streams demuxer fields from void * to struct sh_audio *, struct sh_video * and struct sh_sub *. Remove a now unnecessary cast from mplayer.c.
This commit is contained in:
parent
732ee3474a
commit
d3d12332d6
@ -211,9 +211,9 @@ typedef struct demuxer_st {
|
|||||||
demux_stream_t *sub; // dvd subtitle buffer/demuxer
|
demux_stream_t *sub; // dvd subtitle buffer/demuxer
|
||||||
|
|
||||||
// stream headers:
|
// stream headers:
|
||||||
void* a_streams[MAX_A_STREAMS]; // audio streams (sh_audio_t)
|
struct sh_audio *a_streams[MAX_A_STREAMS];
|
||||||
void* v_streams[MAX_V_STREAMS]; // video sterams (sh_video_t)
|
struct sh_video *v_streams[MAX_V_STREAMS];
|
||||||
void *s_streams[MAX_S_STREAMS]; // dvd subtitles (flag)
|
struct sh_sub *s_streams[MAX_S_STREAMS];
|
||||||
|
|
||||||
demux_chapter_t* chapters;
|
demux_chapter_t* chapters;
|
||||||
int num_chapters;
|
int num_chapters;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// Stream headers:
|
// Stream headers:
|
||||||
|
|
||||||
typedef struct {
|
typedef struct sh_audio {
|
||||||
int aid;
|
int aid;
|
||||||
demux_stream_t *ds;
|
demux_stream_t *ds;
|
||||||
struct codecs_st *codec;
|
struct codecs_st *codec;
|
||||||
@ -54,7 +54,7 @@ typedef struct {
|
|||||||
int default_track;
|
int default_track;
|
||||||
} sh_audio_t;
|
} sh_audio_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct sh_video {
|
||||||
int vid;
|
int vid;
|
||||||
demux_stream_t *ds;
|
demux_stream_t *ds;
|
||||||
struct codecs_st *codec;
|
struct codecs_st *codec;
|
||||||
@ -94,7 +94,7 @@ typedef struct {
|
|||||||
void* context; // codec-specific stuff (usually HANDLE or struct pointer)
|
void* context; // codec-specific stuff (usually HANDLE or struct pointer)
|
||||||
} sh_video_t;
|
} sh_video_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct sh_sub {
|
||||||
int sid;
|
int sid;
|
||||||
char type; // t = text, v = VobSub, a = SSA/ASS
|
char type; // t = text, v = VobSub, a = SSA/ASS
|
||||||
int has_palette; // If we have a valid palette
|
int has_palette; // If we have a valid palette
|
||||||
|
@ -3307,7 +3307,7 @@ if (mpctx->stream->type != STREAMTYPE_DVD && mpctx->stream->type != STREAMTYPE_D
|
|||||||
mpctx->global_sub_indices[SUB_SOURCE_DEMUX] = mpctx->global_sub_size; // the global # of the first demux-specific sub.
|
mpctx->global_sub_indices[SUB_SOURCE_DEMUX] = mpctx->global_sub_size; // the global # of the first demux-specific sub.
|
||||||
for (i = 0; i < MAX_S_STREAMS; i++)
|
for (i = 0; i < MAX_S_STREAMS; i++)
|
||||||
if (mpctx->demuxer->s_streams[i])
|
if (mpctx->demuxer->s_streams[i])
|
||||||
maxid = FFMAX(maxid, ((sh_sub_t *)mpctx->demuxer->s_streams[i])->sid);
|
maxid = FFMAX(maxid, mpctx->demuxer->s_streams[i]->sid);
|
||||||
mpctx->global_sub_size += maxid + 1;
|
mpctx->global_sub_size += maxid + 1;
|
||||||
}
|
}
|
||||||
// Make dvdsub_id always selectable if set.
|
// Make dvdsub_id always selectable if set.
|
||||||
|
Loading…
Reference in New Issue
Block a user